Wrapper for the Doctrine cache.
More...
|
| | createProvider ($type, $params=null) |
| |
| | save ($id, $data, $ttl=null) |
| | Save data to the cache. More...
|
| |
| | fetch ($id, $ttl=null, $callback=null) |
| | Fetch with callback function in case cache fails. More...
|
| |
| | __call ($func_name, $params) |
| | See vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php for the available functions (save, contains, fetch, delete, flushAll, getStats) and more explanation. More...
|
| |
| | __invoke ($id) |
| |
| | __construct ($fred, $config=null) |
| |
| | __destruct () |
| |
| | clientConfig () |
| | Public configuration. More...
|
| |
| | config ($key, $default=null) |
| | Retrieve a config value. More...
|
| |
| | ping () |
| | Ping function. More...
|
| |
| | filemtime ($filename) |
| | Filemtime with session cache. More...
|
| |
| | component ($name) |
| | Get a component (local or default). More...
|
| |
| | components (... $names) |
| | Get multiple components in an array. More...
|
| |
| | propertyExists ($property) |
| | Check if a property exists (public or published). More...
|
| |
| | constants ($prefix=null) |
| | Return all constants. More...
|
| |
| | get ($key) |
| | Get one or more properties. More...
|
| |
| | set ($key, $value=null) |
| | Set one or more properties. More...
|
| |
| | __get ($key) |
| |
| | __set ($key, $value) |
| |
Wrapper for the Doctrine cache.
Definition at line 8 of file Cache.php.
◆ __call()
| __call |
( |
|
$func_name, |
|
|
|
$params |
|
) |
| |
See vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php for the available functions (save, contains, fetch, delete, flushAll, getStats) and more explanation.
Definition at line 109 of file Cache.php.
◆ __invoke()
◆ createProvider()
| createProvider |
( |
|
$type, |
|
|
|
$params = null |
|
) |
| |
◆ fetch()
| fetch |
( |
|
$id, |
|
|
|
$ttl = null, |
|
|
|
$callback = null |
|
) |
| |
Fetch with callback function in case cache fails.
- Parameters
-
| string | $id | Cache id. |
| int | $ttl | Cache lifetime (null = use default, 0 = never expire). |
| function | $callback | Function to get data if cache fails (parameters: $id; returns data). |
- Returns
- mixed Data (false on fail).
Definition at line 68 of file Cache.php.
◆ getProvider()
◆ init()
◆ save()
| save |
( |
|
$id, |
|
|
|
$data, |
|
|
|
$ttl = null |
|
) |
| |
Save data to the cache.
- Parameters
-
| string | $id | Cache id. |
| mixed | $data | |
| int | $ttl | Cache lifetime (null = use default, 0 = never expire). |
Definition at line 52 of file Cache.php.
◆ setRefresh()
◆ $_altParams
| $_altParams = [self::TYPE_ARRAY => null |
|
protected |
◆ $_altProvider
◆ $_altType
| $_altType = self::TYPE_CHAIN |
|
protected |
◆ $_busyTtl
Lifetime for cache slam prevention (default = current timeout).
Definition at line 22 of file Cache.php.
◆ $_duploCount
◆ $_params
Parameters (arguments) for this type of cache.
Definition at line 19 of file Cache.php.
◆ $_provider
◆ $_refresh
◆ $_refreshed
◆ $_type
| $_type = self::TYPE_ARRAY |
|
protected |
◆ $_useAlt
◆ $busyPlaceholder
Placeholder for preventing cache slam.
Definition at line 13 of file Cache.php.
◆ $defaultTtl
Default lifetime.
Definition at line 14 of file Cache.php.
◆ $statPrefix
Set to something to stat all cache requests (hit/miss).
Definition at line 16 of file Cache.php.
◆ $ttlVariation
Variation (plus and minus; percentage) of input value.
Definition at line 15 of file Cache.php.
◆ null
◆ TYPE_ARRAY
| const TYPE_ARRAY = 'array' |
◆ TYPE_CHAIN
| const TYPE_CHAIN = 'chain' |
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Cache.php