PHP Интерфейс Pinq\Caching\ICacheAdapter

Автор: Elliot Levin ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
clear ( ) : void Clears all cached values under the namespace.
contains ( string $key ) : boolean Returns whether the supplied function has
forNamespace ( string $namespace ) : Pinq\Caching\ICacheAdapter Returns a new cache implementation for a new namespace.
getNamespace ( ) : string The namespace of the cache.
hasNamespace ( ) : boolean Whether the cache is namespaced.
inGlobalNamespace ( ) : Pinq\Caching\ICacheAdapter Returns a new cache implementation for the global namespace.
remove ( string $key ) : void Removes the value associated with the supplied key
save ( string $key, mixed $value ) : void Saves the supplied value to the cache.
tryGet ( string $key ) : mixed Attempt to get the cached value associated with the supplied key

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

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

Clears all cached values under the namespace.
public clear ( ) : void
Результат void

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

Returns whether the supplied function has
public contains ( string $key ) : boolean
$key string
Результат boolean

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

Returns a new cache implementation for a new namespace.
public forNamespace ( string $namespace ) : Pinq\Caching\ICacheAdapter
$namespace string
Результат Pinq\Caching\ICacheAdapter

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

The namespace of the cache.
public getNamespace ( ) : string
Результат string

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

Whether the cache is namespaced.
public hasNamespace ( ) : boolean
Результат boolean

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

Returns a new cache implementation for the global namespace.
public inGlobalNamespace ( ) : Pinq\Caching\ICacheAdapter
Результат Pinq\Caching\ICacheAdapter

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

Removes the value associated with the supplied key
public remove ( string $key ) : void
$key string
Результат void

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

Saves the supplied value to the cache.
public save ( string $key, mixed $value ) : void
$key string
$value mixed
Результат void

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

Attempt to get the cached value associated with the supplied key
public tryGet ( string $key ) : mixed
$key string
Результат mixed