Hi Everyone,

 

Taking a peek at Zend Cache, seems like a useful mechanism.

 

I have a question about the scope of duration though.

 

If I do this:

 

**

$cache1 = Zend_Cache::factory(

                'Core',

                'File',

                array(

                                'lifetime' => null,

                                'cache_id_prefix' => 'system',    

                                'automatic_serialization' => true


                ),

                array(

                                'cache_dir' => ROOT . 'cache/zend/'

                )

);

 

$cache1->save( 35, 'testdata' );

**

 

And then down the road.. I do this:

 

**

$cache2 = Zend_Cache::factory(

                'Core',

                'File',

                array(

                                'lifetime' => 30,

                                'cache_id_prefix' => 'system',    

                                'automatic_serialization' => true


                ),

                array(

                                'cache_dir' => ROOT . 'cache/zend/'

                )

);

 

$cache2->save( 1, 'someotherdata' );

**

 

Will the $cache2 potentially clean up the previous data stored by $cache1,
which should have a lifetime of 'null'?

 

I'm wondering if the lifetime is determined by the lifetime specified at the
value's storage, or at the instantiation of the cache handler. 

 

Thank you.

Alexandre Lemaire

Senior Architect/CEO, saeven.net consulting inc.

[EMAIL PROTECTED]

 

Reply via email to