Sys-V shared memory cache. More...
Public Member Functions | |
__construct ($defaultSize=self::DEFAULT_SEGMENT_SIZE, $customSized=array()) | |
__destruct () | |
increment ($key, $value) | |
decrement ($key, $value) | |
get ($key) | |
delete ($key) | |
isAlive () | |
clean () | |
append ($key, $data) | |
Static Public Member Functions | |
static | create ($defaultSize=self::DEFAULT_SEGMENT_SIZE, $customSized=array()) |
Public Attributes | |
const | INDEX_SEGMENT = 12345678 |
const | DEFAULT_SEGMENT_SIZE = 4194304 |
Protected Member Functions | |
store ($action, $key, $value, $expires=0) | |
Private Member Functions | |
getSegment () | |
stringToInt ($string) | |
Private Attributes | |
$defaultSize = null | |
$customSized = array() | |
Static Private Attributes | |
static | $attached = array() |
Sys-V shared memory cache.
Definition at line 17 of file SharedMemory.class.php.
SharedMemory::__construct | ( | $ | defaultSize = self::DEFAULT_SEGMENT_SIZE , |
|
$ | customSized = array() | |||
) |
Definition at line 42 of file SharedMemory.class.php.
References $customSized, and $defaultSize.
SharedMemory::__destruct | ( | ) |
Definition at line 51 of file SharedMemory.class.php.
SharedMemory::append | ( | $ | key, | |
$ | data | |||
) |
Reimplemented from CachePeer.
Definition at line 175 of file SharedMemory.class.php.
References getSegment(), store(), and stringToInt().
SharedMemory::clean | ( | ) |
Reimplemented from CachePeer.
Definition at line 150 of file SharedMemory.class.php.
References stringToInt().
static SharedMemory::create | ( | $ | defaultSize = self::DEFAULT_SEGMENT_SIZE , |
|
$ | customSized = array() | |||
) | [static] |
Definition at line 31 of file SharedMemory.class.php.
References $customSized, and $defaultSize.
SharedMemory::decrement | ( | $ | key, | |
$ | value | |||
) |
Reimplemented from CachePeer.
Definition at line 94 of file SharedMemory.class.php.
SharedMemory::delete | ( | $ | key | ) |
Reimplemented from CachePeer.
Definition at line 128 of file SharedMemory.class.php.
References getSegment(), Assert::isUnreachable(), and stringToInt().
SharedMemory::get | ( | $ | key | ) |
Reimplemented from CachePeer.
Definition at line 104 of file SharedMemory.class.php.
References getSegment(), Assert::isUnreachable(), CachePeer::restoreData(), and stringToInt().
SharedMemory::getSegment | ( | ) | [private] |
Definition at line 228 of file SharedMemory.class.php.
References SelectivePeer::getClassName(), and stringToInt().
Referenced by append(), delete(), get(), and store().
SharedMemory::increment | ( | $ | key, | |
$ | value | |||
) |
Reimplemented from CachePeer.
Definition at line 84 of file SharedMemory.class.php.
SharedMemory::isAlive | ( | ) |
Reimplemented from CachePeer.
Definition at line 141 of file SharedMemory.class.php.
SharedMemory::store | ( | $ | action, | |
$ | key, | |||
$ | value, | |||
$ | expires = 0 | |||
) | [protected] |
Reimplemented from CachePeer.
Definition at line 201 of file SharedMemory.class.php.
References getSegment(), Assert::isUnreachable(), CachePeer::prepareData(), and stringToInt().
Referenced by append().
SharedMemory::stringToInt | ( | $ | string | ) | [private] |
Definition at line 244 of file SharedMemory.class.php.
Referenced by append(), clean(), delete(), get(), getSegment(), and store().
SharedMemory::$attached = array() [static, private] |
Definition at line 26 of file SharedMemory.class.php.
SharedMemory::$customSized = array() [private] |
Definition at line 24 of file SharedMemory.class.php.
Referenced by __construct(), and create().
SharedMemory::$defaultSize = null [private] |
Definition at line 23 of file SharedMemory.class.php.
Referenced by __construct(), and create().
const SharedMemory::DEFAULT_SEGMENT_SIZE = 4194304 |
Definition at line 21 of file SharedMemory.class.php.
const SharedMemory::INDEX_SEGMENT = 12345678 |
Definition at line 19 of file SharedMemory.class.php.