프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$compressionLevel | integer | ||
$database | integer | ||
$entryCursor | Cursor used for iterating over cache entries | ||
$frozen | boolean | ||
$hostname | string | ||
$port | integer | ||
$redis | Redis |
메소드 | 설명 | |
---|---|---|
__construct ( |
Constructs this backend | |
collectGarbage ( ) : void | This backend does not need an externally triggered garbage collection | |
current ( ) | ||
findIdentifiersByTag ( string $tag ) : array | Finds and returns all cache entry identifiers which are tagged by the specified tag. | |
flush ( ) : void | Removes all cache entries of this cache | |
flushByTag ( string $tag ) : integer | Removes all cache entries of this cache which are tagged by the specified tag. | |
freeze ( ) : void | Freezes this cache backend. | |
get ( string $entryIdentifier ) : mixed | Loads data from the cache. | |
has ( string $entryIdentifier ) : boolean | Checks if a cache entry with the specified identifier exists. | |
isFrozen ( ) : boolean | Tells if this backend is frozen. | |
key ( ) | ||
next ( ) | ||
remove ( string $entryIdentifier ) : boolean | Removes all cache entries matching the specified identifier. | |
rewind ( ) | ||
set ( string $entryIdentifier, string $data, array $tags = [], integer $lifetime = null ) : void | Saves data in the cache. | |
setCompressionLevel ( integer $compressionLevel ) | ||
setDatabase ( integer $database ) | Sets the database that will be used for this backend | |
setDefaultLifetime ( integer $lifetime ) : void | Sets the default lifetime for this cache backend | |
setHostname ( string $hostname ) | Sets the hostname or the socket of the Redis server | |
setPort ( string $port ) | Sets the port of the Redis server. | |
setRedis ( Redis $redis = null ) | ||
valid ( ) |
메소드 | 설명 | |
---|---|---|
verifyRedisVersionIsSupported ( ) : void |
메소드 | 설명 | |
---|---|---|
buildKey ( $identifier ) : string | ||
compress ( string $value ) : string | ||
getRedisClient ( ) : Redis | ||
uncompress ( string $value ) : string | ||
useCompression ( ) : boolean |
public __construct ( |
||
$environmentConfiguration | ||
$options | array | Configuration options - depends on the actual backend |
public collectGarbage ( ) : void | ||
리턴 | void |
public findIdentifiersByTag ( string $tag ) : array | ||
$tag | string | The tag to search for |
리턴 | array | An array with identifiers of all matching entries. An empty array if no entries matched |
public flushByTag ( string $tag ) : integer | ||
$tag | string | The tag the entries must have |
리턴 | integer | The number of entries which have been affected by this flush |
public set ( string $entryIdentifier, string $data, array $tags = [], integer $lifetime = null ) : void | ||
$entryIdentifier | string | An identifier for this specific cache entry |
$data | string | The data to be stored |
$tags | array | Tags to associate with this cache entry. If the backend does not support tags, this option can be ignored. |
$lifetime | integer | Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime. |
리턴 | void |
public setCompressionLevel ( integer $compressionLevel ) | ||
$compressionLevel | integer |
public setDatabase ( integer $database ) | ||
$database | integer | Database that will be used |
public setDefaultLifetime ( integer $lifetime ) : void | ||
$lifetime | integer | Default lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. 0 means unlimited lifetime. |
리턴 | void |
public setHostname ( string $hostname ) | ||
$hostname | string | Hostname of the Redis server |