Class Cache (namespace Nette\Caching)
Implements the cache for a application.
Object | --Cache
Implements interfaces:
Public Method Summary | |
---|---|
Cache |
|
static bool |
checkCallbacks
(array $callbacks)
Checks CALLBACKS dependencies.
|
void |
clean
([$conds =
NULL ])
Removes items from the cache by conditions.
|
string |
getNamespace
()
Returns cache namespace.
|
ICacheStorage |
getStorage
()
Returns cache storage.
|
bool |
offsetExists
(string $key)
Exists item in cache? (\ArrayAccess implementation).
|
mixed|NULL |
offsetGet
(string $key)
Retrieves the specified item from the cache or NULL if the key is not found (\ArrayAccess implementation).
|
void |
offsetSet
(string $key, mixed $data)
Inserts (replaces) item into the cache (\ArrayAccess implementation).
|
void |
offsetUnset
(string $key)
Removes the specified item from the cache.
|
void |
release
()
Discards the internal cache.
|
mixed |
save
(string $key, mixed $data, [$dp =
NULL ])
Writes item into the cache.
|
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Constant Summary | |||
---|---|---|---|
string | ALL |
'all' |
line 32 dependency |
string | CALLBACKS |
'callbacks' |
line 31 dependency |
string | CONSTS |
'consts' |
line 30 dependency |
string | EXPIRE |
'expire' |
line 25 dependency |
string | FILES |
'files' |
line 28 dependency |
string | ITEMS |
'items' |
line 29 dependency |
string | PRIORITY |
'priority' |
line 24 dependency |
string | REFRESH |
'sliding' |
line 36 |
string | SLIDING |
'sliding' |
line 26 dependency |
string | TAGS |
'tags' |
line 27 dependency |
Method Details | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 55 __constructpublic Cache __construct (ICacheStorage $storage, [$namespace =
|
||||||||||||||||||||||||
line 282 checkCallbackspublic static bool checkCallbacks (array $callbacks) Checks CALLBACKS dependencies.
|
||||||||||||||||||||||||
line 179 cleanpublic void clean ([$conds = Removes items from the cache by conditions. Conditions are:
|
||||||||||||||||||||||||
line 82 getNamespacepublic string getNamespace () Returns cache namespace.
|
||||||||||||||||||||||||
line 71 getStoragepublic ICacheStorage getStorage () Returns cache storage.
|
||||||||||||||||||||||||
line 242 offsetExistspublic bool offsetExists (string $key) Exists item in cache? (\ArrayAccess implementation). Implementation of:
ArrayAccess::offsetExists
|
||||||||||||||||||||||||
line 219 offsetGetpublic mixed|NULL offsetGet (string $key) Retrieves the specified item from the cache or NULL if the key is not found (\ArrayAccess implementation). Implementation of:
ArrayAccess::offsetGet
|
||||||||||||||||||||||||
line 197 offsetSetpublic void offsetSet (string $key, mixed $data) Inserts (replaces) item into the cache (\ArrayAccess implementation). Implementation of:
ArrayAccess::offsetSet
|
||||||||||||||||||||||||
line 261 offsetUnsetpublic void offsetUnset (string $key) Removes the specified item from the cache. Implementation of:
ArrayAccess::offsetUnset
|
||||||||||||||||||||||||
line 93 releasepublic void release () Discards the internal cache.
|
||||||||||||||||||||||||
line 117 savepublic mixed save (string $key, mixed $data, [$dp = Writes item into the cache. Dependencies are:
|