Memcached
extends Memcached
in package
implements
CacheInterface
uses
MultipleTrait
Extended Rundiz\SimpleCache\Drivers\Memcached class.
Tags
Table of Contents
Interfaces
- CacheInterface
Properties
- $memcachePrefix : string
Methods
- __construct() : mixed
- Class constructor
- delete() : bool
- {@inheritDoc}
- get() : mixed
- {@inheritDoc}
- has() : bool
- {@inheritDoc}
- set() : bool
- {@inheritDoc}
- trimLongKey() : string
- Trim out long cache key from the beginning if it is too longer than Memcached can accept (250).
Properties
$memcachePrefix
protected
string
$memcachePrefix
= ''
Memcached cache key prefix.
Methods
__construct()
Class constructor
public
__construct(Memcached $Memcached[, string $cachePath = '' ]) : mixed
Parameters
- $Memcached : Memcached
-
Memcached class.
- $cachePath : string = ''
-
This will be use as Memcached cache key prefix.
Tags
delete()
{@inheritDoc}
public
delete(mixed $key) : bool
Parameters
- $key : mixed
Return values
boolget()
{@inheritDoc}
public
get(mixed $key[, mixed $default = null ]) : mixed
Parameters
- $key : mixed
- $default : mixed = null
has()
{@inheritDoc}
public
has(mixed $key) : bool
Parameters
- $key : mixed
Return values
boolset()
{@inheritDoc}
public
set(mixed $key, mixed $value[, mixed $ttl = null ]) : bool
Parameters
- $key : mixed
- $value : mixed
- $ttl : mixed = null
Return values
booltrimLongKey()
Trim out long cache key from the beginning if it is too longer than Memcached can accept (250).
private
trimLongKey(string $key) : string
Parameters
- $key : string
-
The cache key included prefix.
Return values
string —Return trimmed cache key from the beginning.