Jelix 1.6.37

memcache22CacheDriver
in package
implements jICacheDriver

cache driver for data stored in Memcached. Use the memcache extension of PHP.

This plugin should be used with a version of the memcache extension, lower than 3.0.1

Tags
subpackage

cache_plugin

Interfaces, Classes and Traits

jICacheDriver
Interface for cache drivers

Table of Contents

$automatic_cleaning_factor  : int
automatic cleaning process always disabled. This driver don't need automatic cleaning because Memcache have an internal cleaning mechanism
$enabled  : bool
active cache ?
$profil_name  : string
profil name used in the ini file
$ttl  : bool
TTL used
$_memcache  : object
Memcache API
$_servers  : string
Memcached servers list
__construct()  : mixed
constructor
decrement()  : bool
decrement a specific data value by $var
delete()  : bool
delete a specific data in the cache
flush()  : bool
clear all data in the cache
garbage()  : bool
remove from the cache data of which TTL was expired element with TTL expired already removed => Nothing to do because memcache have an internal garbage mechanism
get()  : mixed
read a specific data in the cache.
increment()  : bool
increment a specific data value by $var
replace()  : bool
replace a specific data value by $var
set()  : bool
set a specific data in the cache

Properties

$automatic_cleaning_factor

automatic cleaning process always disabled. This driver don't need automatic cleaning because Memcache have an internal cleaning mechanism

public int $automatic_cleaning_factor = 0
Tags
access

public

$profil_name

profil name used in the ini file

public string $profil_name
Tags
access

public

$_memcache

Memcache API

protected object $_memcache

Memcache

Tags
access

protected

$_servers

Memcached servers list

protected string $_servers = '127.0.0.1:11211'
Tags
access

protected

Methods

__construct()

constructor

public __construct(mixed $params) : mixed
Parameters
$params : mixed

driver parameters, written in the ini file

Return values
mixed

decrement()

decrement a specific data value by $var

public decrement(string $key[, mixed $var = 1 ]) : bool
Parameters
$key : string

key used for storing data in the cache

$var : mixed = 1

value used

Return values
bool

false if failure

delete()

delete a specific data in the cache

public delete(string $key) : bool
Parameters
$key : string

key used for storing data in the cache

Return values
bool

false if failure

flush()

clear all data in the cache

public flush() : bool
Return values
bool

false if failure

garbage()

remove from the cache data of which TTL was expired element with TTL expired already removed => Nothing to do because memcache have an internal garbage mechanism

public garbage() : bool
Return values
bool

get()

read a specific data in the cache.

public get(mixed $key) : mixed
Parameters
$key : mixed

key or array of keys used for storing data in the cache

Return values
mixed

$data array of data or false if failure

increment()

increment a specific data value by $var

public increment(string $key[, mixed $var = 1 ]) : bool
Parameters
$key : string

key used for storing data in the cache

$var : mixed = 1

value used

Return values
bool

false if failure

replace()

replace a specific data value by $var

public replace(string $key, mixed $var, int $ttl) : bool
Parameters
$key : string

key used for storing data in the cache

$var : mixed

data to replace

$ttl : int

data time expiration

Return values
bool

false if failure

set()

set a specific data in the cache

public set(string $key, mixed $var, int $ttl) : bool
Parameters
$key : string

key used for storing data

$var : mixed

data to store

$ttl : int

data time expiration

Return values
bool

false if failure

Search results