Hi, I'm trying to show the cache datetime on my template. can you help me?

on my action I do it:

<code>
$cacheManager = $this->getContext()->getViewCacheManager();
    $component_uri =
"@sf_cache_partial?module=dashboard&action=_translations&sf_cache_key=40cd750bba9870f18aada2478b24840a";

    $this->lastModified = $cacheManager->getLastModified( $component_uri );
    $this->lifetime = $cacheManager->getLifetime( $component_uri );
</code>

and on my template I did it:
<code>
 <?php include_component('dashboard', 'translations' ); ?>
 this cache was generated at <?php echo format_date( $lastModified,
'H:mm:ss' ); ?>, next update will be in <?php echo ( ( $lifetime - ( time()
- $lastModified ) ) / 60 ) ?> seconds
</code>

I worked fine, but the variable
sf_cache_key=40cd750bba9870f18aada2478b24840a" is hardcoded, how can I get
this key dinamicaly??

thank you,

Nei

-- 
Nei Rauni Santos
nra...@gmail.com
+55 41 85020985

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to