namespace Nette\Caching
Class Cache
Implements the cache for a application.
- Nette\Object
-
Nette\Caching\Cache implements ArrayAccess
public
|
#
__construct(
ICacheStorage
$storage,
$namespace = NULL
)
|
public
ICacheStorage
|
#
getStorage(
)
Returns cache storage. Returns cache storage. |
public
string
|
#
getNamespace(
)
Returns cache namespace. Returns cache namespace. |
public
void
|
#
release(
)
Discards the internal cache. Discards the internal cache. |
public
mixed
|
#
save(
string
$key,
mixed
$data,
array
$dp = NULL
)
Writes item into the cache. Writes item into the cache. Dependencies are:
Parameters$key string key$data mixed value$dp array dependenciesReturnsmixed value itself
Throws |
public
void
|
#
clean(
array
$conds = NULL
)
Removes items from the cache by conditions. Removes items from the cache by conditions. Conditions are:
Parameters$conds array |
public
void
|
#
offsetSet(
string
$key,
mixed
$data
)
Inserts (replaces) item into the cache (\ArrayAccess implementation). Inserts (replaces) item into the cache (\ArrayAccess implementation). Parameters$key string key$data mixedThrowsImplementation of |
public
mixed|NULL
|
#
offsetGet(
string
$key
)
Retrieves the specified item from the cache or NULL if the key is not found (\ArrayAccess implementation). Retrieves the specified item from the cache or NULL if the key is not found (\ArrayAccess implementation). Parameters$key string keyThrowsImplementation of |
public
bool
|
#
offsetExists(
string
$key
)
Exists item in cache? (\ArrayAccess implementation). Exists item in cache? (\ArrayAccess implementation). Parameters$key string keyThrowsImplementation of |
public
void
|
#
offsetUnset(
string
$key
)
Removes the specified item from the cache. Removes the specified item from the cache. Parameters$key string keyThrowsImplementation of |
public static
bool
|
#
checkCallbacks(
array
$callbacks
)
Checks CALLBACKS dependencies. Checks CALLBACKS dependencies. Parameters$callbacks array |