Property | Type | Description | |
---|---|---|---|
$adapter | An instance of the cache adapter to use. | ||
$app | An instance of the Microweber Application class. |
Method | Description | |
---|---|---|
__construct ( $app = null ) | ||
clear ( ) : boolean | Clears all cache data. | |
debug ( ) : array | Prints cache debug information. | |
delete ( string $cache_group = 'global' ) : boolean | Deletes cache for given $cache_group recursively. | |
get ( string $cache_id, string $cache_group = 'global', boolean $timeout = false ) : mixed | Gets the data from the cache. | |
save ( mixed $data_to_cache, string $cache_id, string $cache_group = 'global', $expiration = false ) : boolean | Stores your data in the cache. |
public save ( mixed $data_to_cache, string $cache_id, string $cache_group = 'global', $expiration = false ) : boolean | ||
$data_to_cache | mixed | your data, anything that can be serialized |
$cache_id | string | id of the cache, you must define it because you will use it later to retrieve the cached content. |
$cache_group | string | (default is 'global') - this is the subfolder in the cache dir. |
return | boolean |