SS_Cache
class SS_Cache (View source)
The [api:SS_Cache]
class provides a bunch of static functions wrapping the Zend_Cache system
in something a little more easy to use with the SilverStripe config system.
Properties
protected static | array | $backends | ||
protected static | array | $backend_picks | ||
protected static | array | $cache_lifetime |
Methods
Add a new named cache backend.
Pick a named cache backend for a particular named cache.
Return the cache lifetime for a particular named cache.
Set the cache lifetime for a particular named cache
Build a cache object.
Details
static protected
init()
Initialize the 'default' named cache backend.
static none
add_backend(string $name, string $type, array $options = array())
Add a new named cache backend.
static none
pick_backend(string $name, string $for, int $priority = 1)
Pick a named cache backend for a particular named cache.
The priority call with the highest number will be the actual backend picked. A backend picked for a specific cache name will always be used instead of 'any' if it exists, no matter the priority.
static string
get_cache_lifetime(string $for)
Return the cache lifetime for a particular named cache.
static
set_cache_lifetime(string $for, int $lifetime = 600, int $priority = 1)
Set the cache lifetime for a particular named cache
static CacheProxy|Zend_Cache_Core
factory(string $for, string $frontend = 'Output', array $frontendOptions = null)
Build a cache object.