How will you read from the cache if you don't know where the the cache file
is?

I would suggest using separate cache instances for different locations. For
example, a database cache could store cache file in /tmp/db while a page
cache could store them in /tmp/pages. You can then pick the right cache for
the task at hand and not deal with specifying directories all the time.

--
*Hector Virgen*
Sr. Web Developer
Walt Disney Parks and Resorts Online
http://www.virgentech.com



On Thu, Sep 23, 2010 at 1:17 PM, debussy007 <[email protected]> wrote:

>
> Hi,
>
> I want to store the cache files at a dynamic location.
>
> e.g.
> ./tmp/123/
> ./tmp/3467/
> ./tmp/18/
> etcetera
>
> But when calling save(), seems that I cannot specify a subdirectory
> unfortunately.
>
> So is there any way to achieve that ?
>
> This is how I use Zend_Cache, but now all files are in "./tmp/" :
> $frontendOptions = array('lifetime' => NULL, 'automatic_serialization' =>
> true);
> $backendOptions = array('cache_dir' => './tmp/');
> $cache = Zend_Cache::factory('Core', 'File', $frontendOptions,
> $backendOptions);
>
>
> Thank you for any help!
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/Zend-Cache-and-dynamic-backend-location-tp2552648p2552648.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>

Reply via email to