PHP Class Lavender\Cloud\Sina\Cache\MemcacheStore

Inheritance: implements Illuminate\Cache\StoreInterface
Datei anzeigen Open project: chekun/laravel4sae

Protected Properties

Property Type Description
$memcache Memcache The Memcache instance.
$prefix string A string that should be prepended to keys.

Public Methods

Method Description
__construct ( Memcache $memcache, string $prefix = '' ) : void Create a new Memcache store.
decrement ( string $key, mixed $value = 1 ) : void Increment the value of an item in the cache.
flush ( ) : void Remove all items from the cache.
forever ( string $key, mixed $value ) : void Store an item in the cache indefinitely.
forget ( string $key ) : void Remove an item from the cache.
get ( string $key ) : mixed Retrieve an item from the cache by key.
getMemcache ( ) : memcache Get the underlying memcache connection.
getPrefix ( ) : string Get the cache key prefix.
increment ( string $key, mixed $value = 1 ) : void Increment the value of an item in the cache.
put ( string $key, mixed $value, integer $minutes ) : void Store an item in the cache for a given number of minutes.
section ( string $name ) : Illuminate\Cache\Section Begin executing a new section operation.

Method Details

__construct() public method

Create a new Memcache store.
public __construct ( Memcache $memcache, string $prefix = '' ) : void
$memcache Memcache
$prefix string
return void

decrement() public method

Increment the value of an item in the cache.
public decrement ( string $key, mixed $value = 1 ) : void
$key string
$value mixed
return void

flush() public method

Remove all items from the cache.
public flush ( ) : void
return void

forever() public method

Store an item in the cache indefinitely.
public forever ( string $key, mixed $value ) : void
$key string
$value mixed
return void

forget() public method

Remove an item from the cache.
public forget ( string $key ) : void
$key string
return void

get() public method

Retrieve an item from the cache by key.
public get ( string $key ) : mixed
$key string
return mixed

getMemcache() public method

Get the underlying memcache connection.
public getMemcache ( ) : memcache
return memcache

getPrefix() public method

Get the cache key prefix.
public getPrefix ( ) : string
return string

increment() public method

Increment the value of an item in the cache.
public increment ( string $key, mixed $value = 1 ) : void
$key string
$value mixed
return void

put() public method

Store an item in the cache for a given number of minutes.
public put ( string $key, mixed $value, integer $minutes ) : void
$key string
$value mixed
$minutes integer
return void

section() public method

Begin executing a new section operation.
public section ( string $name ) : Illuminate\Cache\Section
$name string
return Illuminate\Cache\Section

Property Details

$memcache protected_oe property

The Memcache instance.
protected Memcache $memcache
return Memcache

$prefix protected_oe property

A string that should be prepended to keys.
protected string $prefix
return string