Hello all,
I've been looking for a good way to handle this, and it appear (at
least to me) that symfony does not allow caching of data.
For example I find myself retrieving a data set that I can cache,
but either session variables or request parameters impact what gets
displayed.
I was thinking an interface to do this would be very easy, just
offer something along these lines:
<?php
$cache = new sfDataCache ();
if (!$cache->retrieve('myDataCacheKey'))
{
$c = new Criteria();
$myData = MyPeer::doSelect($c);
$cache->set('myDataCacheKey', $myData);
}
$myData = $cache->retrieve('myDataCacheKey');
?>
I am thinking the set method would have optional parameters for
setting things like cache duration, or flat file storage path. Also
possibly a method to "unset" a cache key.
Did I miss something like this in symfony?
-Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "symfony
developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---