Ticket #665 (new enhancement)
ezCacheManagerModel - Caching code sample
| Reported by: | ross | Owned by: | david |
|---|---|---|---|
| Priority: | normal | Milestone: | AgaviForge |
| Component: | _OTHER_ | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Patch attached: | yes |
Description (last modified by ross) (diff)
Allows you to have a cache that isn't session related.
(ezcCache allows for file or memory caching so its flexible.)
ezCacheManagerModel.class.php - is an adapter interface to ezcCacheManager 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!
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

