#665: ezCacheManagerModel - Caching code sample
---------------------+------------------------------------------------------
Reporter: ross | Owner: david
Type: defect | Status: new
Priority: normal | Milestone: 1.1
Component: _OTHER_ | Version: HEAD
Severity: normal | Keywords:
Has_patch: 1 |
---------------------+------------------------------------------------------
Allows you to have a cache that isn't session related.[[BR]]
(ezcCache allows for file or memory caching so its flexible.)
ezCacheManagerModel.class.php - is an adapter interface to ezCacheManager
whilst still allowing for Agaviesq configuration.
ezCache.xml - is the default cache configurations
'''Usage example'''
{{{
$ezCache =
$this->context->getModel(‘ezCacheManager’)->fetchCache(‘myCache’);
// Store some info
$ezCache->store('test', 'this is some test data');
// restore from cache
$test = $ezCache->restore('test');
}}}
'''Requirements'''
* AgaviConfig::get('ezcomponents.lib_dir') - I set this in config.php
sets the location of the ezcomponents dir - you could change it in the
ezCacheManagerModel
* app/cache/ezCache.xml - you could change it in the ezCacheManagerModel
* ezcomponents Base and Cache!
--
Ticket URL: <http://trac.agavi.org/ticket/665>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets