Hi
Here's some code:
// Setup cache object
$frontendOptions = array(
'lifetime' => 1800,
'automatic_serialization' => true
);
$backendOptions = array(
'cache_dir' => '../data/cache/'
);
$cache = Zend_Cache::factory(
'Core',
'File',
$frontendOptions,
$backendOptions
);
Later when getting data from cache
if (!$data = $cache->load('datafromdb')) {
// Read data from db
...
$cache->save($data, 'datafromdb');
}
The save() method accepts 5 params: data, id, tags, specificLifetime,
priority.
What happens if I tell cache to save this record with a specific lifetime of
3600 seconds?
Will it keep the new lifetime or the 1800 seconds defined in the frontend
options array ?
Thanks in advance.
holo