JCacheStorageMemcached

Extends \JCacheStorage

Memcached cache storage handler

link

https://secure.php.net/manual/en/book.memcached.php

since

12.1

package

Joomla.Platform

Methods

__construct

Constructor

__construct(array $options = array()) 
inherited
since

11.1

Arguments

$options

arrayOptional parameters

_getCacheId

Get a cache ID string from an ID/group pair

_getCacheId(string $id, string $group) : string
inherited
since

11.1

Arguments

$id

stringThe cache data ID

$group

stringThe cache data group

Response

string

addIncludePath

Add a directory where JCacheStorage should search for handlers. You may either pass a string or an array of directories.

addIncludePath(array|string $path = '') : array
inherited static
since

11.1

Arguments

$path

array|stringA path to search.

Response

arrayAn array with directory elements

clean

Clean cache for a group given a mode.

clean(string $group, string $mode = null) : boolean
inherited

group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group

since

11.1

Arguments

$group

stringThe cache data group

$mode

stringThe mode for cleaning cache [group|notgroup]

Response

boolean

contains

Check if the cache contains data stored by ID and group

contains(string $id, string $group) : boolean
inherited
since

3.7.0

Arguments

$id

stringThe cache data ID

$group

stringThe cache data group

Response

boolean

flush

Flush all existing items in storage.

flush() : boolean
inherited
since

3.6.3

Response

boolean

gc

Garbage collect expired cache data

gc() : boolean
inherited
since

11.1

Response

boolean

get

Get cached data by ID and group

get(string $id, string $group, boolean $checkTime = true) : mixed
inherited
since

11.1

Arguments

$id

stringThe cache data ID

$group

stringThe cache data group

$checkTime

booleanTrue to verify cache time expiration threshold

Response

mixedBoolean false on failure or a cached data object

getAll

Get all cached data

getAll() : mixed
inherited
since

11.1

Response

mixedBoolean false on failure or a cached data object

getConnection

Create the Memcached connection

getConnection() : void
since

12.1

throws

\RuntimeException

getInstance

Returns a cache storage handler object.

getInstance(string $handler = null, array $options = array()) : \JCacheStorage
inherited static
since

11.1

throws

\UnexpectedValueException

\JCacheExceptionUnsupported

Arguments

$handler

stringThe cache storage handler to instantiate

$options

arrayArray of handler options

Response

\JCacheStorage

isSupported

Test to see if the storage handler is available.

isSupported() : boolean
inherited static
since

12.1

Response

boolean

lock

Lock cached item

lock(string $id, string $group, integer $locktime) : mixed
inherited
since

11.1

Arguments

$id

stringThe cache data ID

$group

stringThe cache data group

$locktime

integerCached item max lock time

Response

mixedBoolean false if locking failed or an object containing properties lock and locklooped

lockindex

Lock cache index

lockindex() : boolean
since

12.1

Response

boolean

remove

Remove a cached data entry by ID and group

remove(string $id, string $group) : boolean
inherited
since

11.1

Arguments

$id

stringThe cache data ID

$group

stringThe cache data group

Response

boolean

store

Store the data to cache by ID and group

store(string $id, string $group, string $data) : boolean
inherited
since

11.1

Arguments

$id

stringThe cache data ID

$group

stringThe cache data group

$data

stringThe data to store in cache

Response

boolean

test

Test to see if the storage handler is available.

test() : boolean
inherited static deprecated
since

11.1

deprecated

12.3 (Platform) & 4.0 (CMS)

Response

boolean

unlock

Unlock cached item

unlock(string $id, string $group = null) : boolean
inherited
since

11.1

Arguments

$id

stringThe cache data ID

$group

stringThe cache data group

Response

boolean

unlockindex

Unlock cache index

unlockindex() : boolean
since

12.1

Response

boolean

Properties

_db

Memcached connection object

static

Type(s)

\Memcached

_compress

Payload compression level

Type(s)

integer

rawname

The raw object name

inherited

Type(s)

string

_now

Time that the cache storage handler was instantiated

inherited

Type(s)

integer

_lifetime

Cache lifetime

inherited

Type(s)

integer

_locking

Flag if locking is enabled

inherited

Type(s)

boolean

_language

Language code

inherited

Type(s)

string

_application

Application name

inherited

Type(s)

string

_hash

Object hash

inherited

Type(s)

string