Memcache
class Memcache (View source)
An interface to the App Engine memory cache with an interface compatible with the "memcache" PHP extension (see http://php.net/manual/en/book.memcache.php)
All instances of this class use the same memory pool for their keys and values.
Methods
Adds a new item to the cache. Will fail if the key is already present in the cache.
This function is present only for compatibility and does nothing.
This function is present only for compatibility and does nothing.
This function is present only for compatibility and does nothing.
Decrements a cached item's value. The value must be a int, float or string representing an integer e.g. 5, 5.0 or "5" or the call with fail.
Deletes an item from the cache.
Removes all items from cache.
Fetches previously stored data from the cache.
Increments a cached item's value. The value must be a int, float or string representing an integer e.g. 5, 5.0 or "5" or the call with fail.
This function is present only for compatibility and does nothing.
Replaces an existing item in the cache. Will fail if the key is not already present in the cache.
Sets the value of a key in the cache regardless of whether it is currently present or not.
This function is present only for compatibility and does nothing.
Details
at line 78
bool
add(string $key, mixed $value, int $flag = null, int $expire = 0)
Adds a new item to the cache. Will fail if the key is already present in the cache.
at line 97
addServer($host)
This function is present only for compatibility and does nothing.
at line 104
close()
This function is present only for compatibility and does nothing.
at line 111
connect($host, $port = null, $timeout = 1)
This function is present only for compatibility and does nothing.
at line 126
mixed
decrement(string $key, int $value = 1)
Decrements a cached item's value. The value must be a int, float or string representing an integer e.g. 5, 5.0 or "5" or the call with fail.
at line 139
bool
delete(string $key)
Deletes an item from the cache.
at line 164
bool
flush()
Removes all items from cache.
at line 211
mixed
get(string|string[] $keys, int $flags = null)
Fetches previously stored data from the cache.
at line 250
mixed
increment(string $key, int $value = 1)
Increments a cached item's value. The value must be a int, float or string representing an integer e.g. 5, 5.0 or "5" or the call with fail.
at line 295
pconnect($host, $port = null, $timeout = 1)
This function is present only for compatibility and does nothing.
at line 321
bool
replace(string $key, mixed $value, int $flag = null, int $expire = 0)
Replaces an existing item in the cache. Will fail if the key is not already present in the cache.
at line 359
bool
set(string $key, mixed $value, int $flag = null, int $expire = 0)
Sets the value of a key in the cache regardless of whether it is currently present or not.
at line 378
setCompressThreshold($threshold, $min_savings = 0.2)
This function is present only for compatibility and does nothing.