Stud.IP
5.4
|
Public Member Functions | |
expire ($arg) | |
flush () | |
read ($arg) | |
write ($name, $content, $expires=self::DEFAULT_EXPIRATION) | |
getStats () | |
Static Public Member Functions | |
static | getDisplayName () |
static | getConfig () |
Data Fields | |
const | DEFAULT_EXPIRATION = 12 * 60 * 60 |
expire | ( | $arg | ) |
Expire item from the cache.
Example:
$cache->expire('foo');
string | $arg | a single key |
Implemented in StudipFileCache, StudipRedisCache, StudipMemcachedCache, StudipCacheProxy, StudipCacheWrapper, StudipDbCache, and StudipMemoryCache.
flush | ( | ) |
1 Expire all items from the cache.
Implemented in StudipRedisCache, StudipFileCache, StudipMemcachedCache, StudipCacheProxy, StudipDbCache, StudipCacheWrapper, and StudipMemoryCache.
|
static |
Return the Vue component name and props that handle configuration. The associative array is of the form [ 'component' => <Vue component="" name>="">, 'props' => <Properties for="" component>=""> ]
Implemented in StudipFileCache, StudipRedisCache, StudipMemcachedCache, StudipDbCache, StudipCacheProxy, StudipCacheWrapper, and StudipMemoryCache.
|
static |
Implemented in StudipCacheProxy, StudipCacheWrapper, StudipMemoryCache, StudipFileCache, StudipMemcachedCache, StudipRedisCache, and StudipDbCache.
getStats | ( | ) |
Get some statistics from cache, like number of entries, hit rate or whatever the underlying cache provides. Results are returned in form of an array like "[ [ 'name' => <displayable name>=""> 'value' =>
] ]"
Implemented in StudipFileCache, StudipRedisCache, StudipMemcachedCache, StudipCacheProxy, StudipDbCache, StudipCacheWrapper, and StudipMemoryCache.
read | ( | $arg | ) |
Retrieve item from the server.
Example:
$foo = $cache->reads('foo');
string | $arg | a single key |
Implemented in StudipFileCache, StudipMemcachedCache, StudipRedisCache, StudipCacheProxy, StudipDbCache, StudipCacheWrapper, and StudipMemoryCache.
write | ( | $name, | |
$content, | |||
$expires = self::DEFAULT_EXPIRATION |
|||
) |
Store data at the server.
string | $name | the item's key. |
mixed | $content | the item's content (will be serialized if necessary). |
int | $expires | the item's expiry time in seconds. Optional, defaults to 12h. |
Implemented in StudipFileCache, StudipMemcachedCache, StudipRedisCache, StudipCacheProxy, StudipDbCache, StudipCacheWrapper, and StudipMemoryCache.
const DEFAULT_EXPIRATION = 12 * 60 * 60 |