PHP 클래스 CI_Cache_redis, TastyIgniter

저자: Anton Lindqvist ([email protected])
상속: extends CI_Driver
파일 보기 프로젝트 열기: tastyigniter/tastyigniter

보호된 프로퍼티들

프로퍼티 타입 설명
$_default_config array Default config
$_redis Redis Redis connection
$_serialized array An internal cache for storing keys of serialized values.

공개 메소드들

메소드 설명
__construct ( ) : void Class constructor
__destruct ( ) : void Class destructor
cache_info ( string $type = NULL ) : array Get cache driver info
clean ( ) : boolean Clean cache
decrement ( string $id, integer $offset = 1 ) : mixed Decrement a raw value
delete ( string $key ) : boolean Delete from cache
get ( string $key ) : mixed Get cache
get_metadata ( string $key ) : array Get cache metadata
increment ( string $id, integer $offset = 1 ) : mixed Increment a raw value
is_supported ( ) : boolean Check if Redis driver is supported
save ( string $id, mixed $data, integer $ttl = 60, boolean $raw = FALSE ) : boolean Save cache

메소드 상세

__construct() 공개 메소드

Setup Redis Loads Redis config file if present. Will halt execution if a Redis connection can't be established.
또한 보기: Redis::connect()
public __construct ( ) : void
리턴 void

__destruct() 공개 메소드

Closes the connection to Redis if present.
public __destruct ( ) : void
리턴 void

cache_info() 공개 메소드

Get cache driver info
또한 보기: Redis::info()
public cache_info ( string $type = NULL ) : array
$type string Not supported in Redis. Only included in order to offer a consistent cache API.
리턴 array

clean() 공개 메소드

Clean cache
또한 보기: Redis::flushDB()
public clean ( ) : boolean
리턴 boolean

decrement() 공개 메소드

Decrement a raw value
public decrement ( string $id, integer $offset = 1 ) : mixed
$id string Cache ID
$offset integer Step/value to reduce by
리턴 mixed New value on success or FALSE on failure

delete() 공개 메소드

Delete from cache
public delete ( string $key ) : boolean
$key string Cache key
리턴 boolean

get() 공개 메소드

Get cache
public get ( string $key ) : mixed
$key string Cache ID
리턴 mixed

get_metadata() 공개 메소드

Get cache metadata
public get_metadata ( string $key ) : array
$key string Cache key
리턴 array

increment() 공개 메소드

Increment a raw value
public increment ( string $id, integer $offset = 1 ) : mixed
$id string Cache ID
$offset integer Step/value to add
리턴 mixed New value on success or FALSE on failure

is_supported() 공개 메소드

Check if Redis driver is supported
public is_supported ( ) : boolean
리턴 boolean

save() 공개 메소드

Save cache
public save ( string $id, mixed $data, integer $ttl = 60, boolean $raw = FALSE ) : boolean
$id string Cache ID
$data mixed Data to save
$ttl integer Time to live in seconds
$raw boolean Whether to store the raw value (unused)
리턴 boolean TRUE on success, FALSE on failure

프로퍼티 상세

$_default_config 보호되어 있는 정적으로 프로퍼티

Default config
protected static array $_default_config
리턴 array

$_redis 보호되어 있는 프로퍼티

Redis connection
protected Redis $_redis
리턴 Redis

$_serialized 보호되어 있는 프로퍼티

An internal cache for storing keys of serialized values.
protected array $_serialized
리턴 array