Class storage
Caches data using Core Storage.
- Core\Object implements Core\Chainable
-
Core\Set
implements
Core\Accessor
-
Core\Cache
-
Core\Cache\Driver\storage
Package: Core\Cache
Since: 3.1
Requires: PHP 5.3
Version: 1.0
Located at Cache/Driver/storage.inc.php
Methods summary
public
|
|
public
integer|boolean
|
#
chain(
Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions. Sets the cache storage instance. |
public
boolean
|
|
public
string
|
|
public
string
|
#
getHash( string $class, string $key )
Returns the hash for the requested cache entry. The hash type depends on the backend in use and defaults to 16-byte binary MD5. |
public
|
#
getStream( string $class, string $key )
Returns a reading stream instance for the requested cache entry. |
public
integer
|
#
getTimestamp( string $class, string $key )
Returns a UNIX timestamp of the last cache entry modification. |
public
|
#
put( string $class, string $key, string $binaryData, integer $ttl =
Writes binary data to a specified cache entry. |
public
|
#
putStream( string $class, string $key, integer $ttl =
Returns a writing stream instance for the requested cache entry. |
public
|
#
remove( string $class, string $key )
Deletes a cache key entry. If the entry does not exist, no operation is performed. |
Methods inherited from Core\Cache
activate(),
active(),
autocreate(),
defaultInstance(),
getAge(),
getMeta(),
getVar(),
putVar(),
setVersionID(),
unify()
Methods inherited from Core\Object
__autocreateFactory(),
__call(),
__processParameters(),
__toString(),
attachMethod(),
getValueForKey(),
getValueForKeyPath(),
getValueForUndefinedKey(),
hash(),
issetValueForKey(),
setValueForKey(),
setValueForKeyPath(),
setValueForUndefinedKey(),
uuid()
Constants summary
string |
AutochainParameter
List of automatically chained registry keys. |
#
'autochain'
|
string |
ClassNameParameter
Name of storage class field (primary key pt. 1). |
#
'class-name'
|
string |
HashNameParameter
Name of hash field. |
#
'hash-name'
|
string |
KeyNameParameter
Name of key field (primary key pt. 2). |
#
'key-name'
|
string |
ReferenceParameter
Name of storage reference (e.g. database table). |
#
'reference'
|
string |
TimestampNameParameter
Name of timestamp field. |
#
'timestamp-name'
|
string |
TTLNameParameter
Name of TTL field. |
#
'ttl-name'
|
string |
ValueNameParameter
Name of data field (BLOB). |
#
'value-name'
|
string |
VersionNameParameter
Name of version field (INTEGER). |
#
'version-name'
|
Constants inherited from Core\Cache
Constants inherited from Core\Object
AnyParameterType,
AutochainParameterType,
AutocreateParameterType,
BooleanParameterType,
CharParameterType,
EnumParameterType,
IntegerParameterType,
RealParameterType,
StringParameterType,
UserParameterType
Properties summary
protected
|
$_v_driver
Reference to chained storage driver instance. |
|
protected
array
|
$_v_parameters
Storage cache settings array. |
|
protected
string
|
$_v_reference
Storage cache reference name. |
Properties inherited from Core\Cache
Magic properties
public read-only
|
$driver
Chained storage driver. |
public read-only
array
|
$parameters
Configuration paramters array. |
public read-only
string
|
$reference
Assigned storage reference name. |