PHP Интерфейс Prado\Caching\ICache

This interface must be implemented by cache managers.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Показать файл Открыть проект

Открытые методы

Метод Описание
add ( $id, $value, $expire, $dependency = null ) : boolean Stores a value identified by a key into cache if the cache does not contain this key.
delete ( $id ) : boolean Deletes a value with the specified key from cache
flush ( ) Deletes all values from cache.
get ( $id ) : mixed Retrieves a value from cache with a specified key.
set ( $id, $value, $expire, $dependency = null ) : boolean Stores a value identified by a key into cache.

Описание методов

add() публичный Метод

Nothing will be done if the cache already contains the key.
public add ( $id, $value, $expire, $dependency = null ) : boolean
Результат boolean true if the value is successfully stored into cache, false otherwise

delete() публичный Метод

Deletes a value with the specified key from cache
public delete ( $id ) : boolean
Результат boolean if no error happens during deletion

flush() публичный Метод

Be careful of performing this operation if the cache is shared by multiple applications.
public flush ( )

get() публичный Метод

Retrieves a value from cache with a specified key.
public get ( $id ) : mixed
Результат mixed the value stored in cache, false if the value is not in the cache or expired.

set() публичный Метод

If the cache already contains such a key, the existing value and expiration time will be replaced with the new ones.
public set ( $id, $value, $expire, $dependency = null ) : boolean
Результат boolean true if the value is successfully stored into cache, false otherwise