e107 Core Code: e107 Cache
Examples of using
Cache handler:
$e107cache = e107::getCache();
Retrieve cache:
if( $cacheData = $e107cache->retrieve('your_code')) { return $cacheData; }
Save cache:
$cache_data = ''; $cache_data = $text; $e107cache->set('your_code', $cache_data); return $cache_data;
System cache:
e107::getCache()->set_sys(params); e107::getCache()->retrieve_sys('params'); e107::getCache()->clear_sys();
Custom Hash with caching
Set cache:
$e107cache = e107::getCache(); $e107cache->setMD5('your hash'); $e107cache->set('your tag', $cache_data);
Get cache:
e107::getCache()->setMD5('your hash'))->retrieve('your tag');