extends
BrGenericCacheProviderImplements simple in memory caching class.
There is singleton object for every cache types suported by the application, so you can access cache via magic br() function:
// getting cache instance for futher usage $cache = br()->cache('memory'); // because memory cache is default cache type - you can call it withotu specifying "memory" as paramater $cache = br()->cache(); // accessing cache method directly $value = br()->cache()->get('cacheValueKey');
There is no public fiels in this class
Name | Description |
---|---|
Inherited from BrGenericCacheProvider | |
set ($name, $value); | Set cached value for specified $name. |
get ($name, $defaultValue = null, $saveDefaultValue = false); | Get cached value for specified $name. If value missing in cache - $defaulValue will be returned. If $saveDefaultValue set to TRUE - $defaultValue wil be saved as cached value for specified $name. |
exists ($name); | Check if specified $name has cached value. |
remove ($name); | Remove cached value for specified $name. |