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
Cache
|
#
derive(
string
$namespace
)
Returns new nested cache object. Returns new nested cache object. Parameters$namespace string |
public
void
|
#
release(
)
Discards the internal cache. Discards the internal cache. |
public
mixed
|
#
save(
mixed
$key,
mixed
$data,
array
$dp = NULL
)
Writes item into the cache. Writes item into the cache. Dependencies are:
Parameters$key mixed 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
mixed
|
#
call(
mixed
$function
)
Caches results of function/method calls. Caches results of function/method calls. Parameters$function mixed |
public
void
|
#
offsetSet(
mixed
$key,
mixed
$data
)
Inserts (replaces) item into the cache (\ArrayAccess implementation). Inserts (replaces) item into the cache (\ArrayAccess implementation). Parameters$key mixed key$data mixedThrowsImplementation of |
public
mixed|NULL
|
#
offsetGet(
mixed
$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 mixed keyThrowsImplementation of |
public
bool
|
#
offsetExists(
mixed
$key
)
Exists item in cache? (\ArrayAccess implementation). Exists item in cache? (\ArrayAccess implementation). Parameters$key mixed keyThrowsImplementation of |
public
void
|
#
offsetUnset(
mixed
$key
)
Removes the specified item from the cache. Removes the specified item from the cache. Parameters$key mixed keyThrowsImplementation of |
public static
bool
|
#
checkCallbacks(
array
$callbacks
)
Checks CALLBACKS dependencies. Checks CALLBACKS dependencies. Parameters$callbacks array |