|
| AddPool ($name) |
|
| AddPoolServer ($serverIP, $serverPORT, $serverWEIGHT, $poolNAME=self::DefaultPoolName) |
|
| Get ($key, &$data, $poolNAME=self::DefaultPoolName) |
|
| Set ($key, $data, $namespaces=NULL, $expire=StormCachePool::DefaultCacheExpiryTime, $poolNAME=self::DefaultPoolName) |
|
| SetMulti ($items, $expire=StormCachePool::DefaultCacheExpiryTime, $poolNAME=self::DefaultPoolName) |
|
| Replace ($key, $data, $expire=StormCachePool::DefaultCacheExpiryTime, $poolNAME=self::DefaultPoolName) |
|
| SetReplace ($key, $data, $namespaces=NULL, $expire=StormCachePool::DefaultCacheExpiryTime, $poolNAME=self::DefaultPoolName) |
|
| ExpireNamespace ($namespaces, $poolNAME=self::DefaultPoolName) |
|
| Flush ($poolNAME=self::DefaultPoolName) |
|
| Delete ($key, $poolNAME=self::DefaultPoolName) |
|
| DeleteMulti ($keys, $poolNAME=self::DefaultPoolName) |
|
| Touch ($key, $expire=StormCachePool::DefaultCacheExpiryTime, $poolNAME=self::DefaultPoolName) |
|
| TouchMulti ($keys, $expire=StormCachePool::DefaultCacheExpiryTime, $poolNAME=self::DefaultPoolName) |
|
| GetStats ($poolNAME=self::DefaultPoolName) |
|
| GetHits ($poolNAME=self::DefaultPoolName) |
|
| GetMisses ($poolNAME=self::DefaultPoolName) |
|
| IsEnabled () |
|
| SetEncryptionCredentials ($password) |
|
| IsEncryptionEnabled () |
|
|
const | DefaultPoolName = "default" |
|
◆ AddPool()
StormCache::AddPool |
( |
|
$name | ) |
|
Adds a new pool.
- Parameters
-
string | $name | The name of the pool. |
- Exceptions
-
◆ AddPoolServer()
StormCache::AddPoolServer |
( |
|
$serverIP, |
|
|
|
$serverPORT, |
|
|
|
$serverWEIGHT, |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Adds a Memcached server to a pool.
- Parameters
-
string | $serverIP | The server's IP address. |
int | $serverPORT | The server's port. |
int | $serverWEIGHT | The weight of the server relative to others in the pool. |
string | $poolNAME | The name of the pool (default is "default"). |
- Exceptions
-
◆ Delete()
StormCache::Delete |
( |
|
$key, |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Deletes a stored key data
- Parameters
-
string | $key | |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
- Returns
- bool Operation Status
◆ DeleteMulti()
StormCache::DeleteMulti |
( |
|
$keys, |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Deletes multiple items in cache
- Parameters
-
string[] | $keys | Keys to delete |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
- Returns
- bool Operation Status
◆ ExpireNamespace()
StormCache::ExpireNamespace |
( |
|
$namespaces, |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Expires namespaces
- Parameters
-
string | array | $namespaces | |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
◆ Flush()
StormCache::Flush |
( |
|
$poolNAME = self::DefaultPoolName | ) |
|
Flush all data from cache
- Parameters
-
string | array | NULL | $poolNAME | Pool Name to flush data from (NULL to flush all) |
◆ Get()
StormCache::Get |
( |
|
$key, |
|
|
& |
$data, |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Retrieves data from the cache.
- Parameters
-
string | $key | The key to retrieve. |
mixed | &$data | Reference variable to store the retrieved data. |
string | $poolNAME | The name of the pool (default is "default"). |
- Exceptions
-
◆ GetHits()
StormCache::GetHits |
( |
|
$poolNAME = self::DefaultPoolName | ) |
|
Gets cache hits
- Parameters
-
string | NULL | $poolNAME | Pool Name (if not specified, all pools are selected) |
- Returns
- int
◆ GetInstance()
static StormCache::GetInstance |
( |
| ) |
|
|
static |
◆ GetMisses()
StormCache::GetMisses |
( |
|
$poolNAME = self::DefaultPoolName | ) |
|
Gets cache misses
- Parameters
-
string | NULL | $poolNAME | Pool Name (if not specified, all pools are selected) |
- Returns
- int
◆ GetStats()
StormCache::GetStats |
( |
|
$poolNAME = self::DefaultPoolName | ) |
|
Gets pool stats
- Parameters
-
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
string | NULL | $poolNAME | Pool Name (if not specified, all pools are selected) |
- Returns
- array|null
◆ IsEnabled()
StormCache::IsEnabled |
( |
| ) |
|
Is Cache enabled? (If it has no servers, then it is not enabled)
- Returns
- bool
◆ IsEncryptionEnabled()
StormCache::IsEncryptionEnabled |
( |
| ) |
|
Is encryption enabled?
- Returns
- bool
◆ Replace()
StormCache::Replace |
( |
|
$key, |
|
|
|
$data, |
|
|
|
$expire = StormCachePool::DefaultCacheExpiryTime , |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Replaces data in cache
- Parameters
-
string | $key | Key |
mixed | $data | Data to store |
int | $expire | Expire time seconds if less than 30 days or timestamp if it is greater |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
◆ Set()
StormCache::Set |
( |
|
$key, |
|
|
|
$data, |
|
|
|
$namespaces = NULL , |
|
|
|
$expire = StormCachePool::DefaultCacheExpiryTime , |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Stores data in the cache.
- Parameters
-
string | $key | The key to store the data under. |
mixed | $data | The data to store. |
string | array | null | $namespaces | The namespace(s) to bind the data to (optional). |
int | $expire | Expiration time in seconds (or timestamp if greater than 30 days). |
string | $poolNAME | The name of the pool (default is "default"). |
- Returns
- bool True if the operation was successful, false otherwise.
◆ SetEncryptionCredentials()
StormCache::SetEncryptionCredentials |
( |
|
$password | ) |
|
Set encryption password (and implicitelly enable encryption features)
- Parameters
-
string | $password | Password for encrypting |
◆ SetMulti()
StormCache::SetMulti |
( |
|
$items, |
|
|
|
$expire = StormCachePool::DefaultCacheExpiryTime , |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Sets multiple data at once (SetMulti do NOT support namespace currently)
- Parameters
-
array | $items | Items to be added in the form key => data (do NOT store boolean false in data) |
int | $expire | Expire time seconds if less than 30 days or timestamp if it is greater |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
- Returns
- bool Operation Status
◆ SetReplace()
StormCache::SetReplace |
( |
|
$key, |
|
|
|
$data, |
|
|
|
$namespaces = NULL , |
|
|
|
$expire = StormCachePool::DefaultCacheExpiryTime , |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Sets or replace data (it does not throw any exception to improve code quality when using the lib)
- Since
- 3.1.1
- Parameters
-
string | $key | Key Key to store data in server |
mixed | $data | Data Data to store (do NOT store a boolean FALSE, because it will be stored but appear as failed when get) |
string | array | NULL | $namespaces | Namespace to bind data to (if applicable) |
int | $expire | Expire time seconds if less than 30 days or timestamp if it is greater |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
- Returns
- bool Operation Status
◆ Touch()
StormCache::Touch |
( |
|
$key, |
|
|
|
$expire = StormCachePool::DefaultCacheExpiryTime , |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Touch data (sets new expiration time)
- Parameters
-
string | $key | Key to be affected |
int | $expire | Expire time seconds if less than 30 days or timestamp if it is greater |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
- Returns
- bool Operation Status
◆ TouchMulti()
StormCache::TouchMulti |
( |
|
$keys, |
|
|
|
$expire = StormCachePool::DefaultCacheExpiryTime , |
|
|
|
$poolNAME = self::DefaultPoolName |
|
) |
| |
Touch multiple data (sets new expiration time)
- Parameters
-
string[] | $keys | Keys to be affected |
int | $expire | Expire time seconds if less than 30 days or timestamp if it is greater |
string | $poolNAME | Pool Name (if not specified, default pool is selected) |
- Returns
- bool Operation Status
The documentation for this class was generated from the following file: