PHP 클래스 CI_Cache, TastyIgniter

저자: EllisLab Dev Team
상속: extends CI_Driver_Library
파일 보기 프로젝트 열기: tastyigniter/tastyigniter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$key_prefix string Cache key prefix

보호된 프로퍼티들

프로퍼티 타입 설명
$_adapter mixed Reference to the driver
$_backup_driver string Fallback driver
$_cache_path string Path of cache files (if file-based cache)
$valid_drivers array Valid cache drivers

공개 메소드들

메소드 설명
__construct ( array $config = [] ) : void Constructor
cache_info ( string $type = 'user' ) : mixed Cache Info
clean ( ) : boolean Clean the cache
decrement ( string $id, integer $offset = 1 ) : mixed Decrement a raw value
delete ( string $id ) : boolean Delete from Cache
get ( string $id ) : mixed Get
get_metadata ( string $id ) : mixed Get Cache Metadata
increment ( string $id, integer $offset = 1 ) : mixed Increment a raw value
is_supported ( string $driver ) : array Is the requested driver supported in this environment?
save ( string $id, mixed $data, integer $ttl = 60, boolean $raw = FALSE ) : boolean Cache Save

메소드 상세

__construct() 공개 메소드

Initialize class properties based on the configuration array.
public __construct ( array $config = [] ) : void
$config array = array()
리턴 void

cache_info() 공개 메소드

Cache Info
public cache_info ( string $type = 'user' ) : mixed
$type string = 'user' user/filehits
리턴 mixed array containing cache info on success OR FALSE on failure

clean() 공개 메소드

Clean the cache
public clean ( ) : boolean
리턴 boolean TRUE on success, FALSE on failure

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 $id ) : boolean
$id string Cache ID
리턴 boolean TRUE on success, FALSE on failure

get() 공개 메소드

Look for a value in the cache. If it exists, return the data if not, return FALSE
public get ( string $id ) : mixed
$id string
리턴 mixed value matching $id or FALSE on failure

get_metadata() 공개 메소드

Get Cache Metadata
public get_metadata ( string $id ) : mixed
$id string key to get cache metadata on
리턴 mixed cache item metadata

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() 공개 메소드

Is the requested driver supported in this environment?
public is_supported ( string $driver ) : array
$driver string The driver to test
리턴 array

save() 공개 메소드

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

프로퍼티 상세

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

Reference to the driver
protected mixed $_adapter
리턴 mixed

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

Fallback driver
protected string $_backup_driver
리턴 string

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

Path of cache files (if file-based cache)
protected string $_cache_path
리턴 string

$key_prefix 공개적으로 프로퍼티

Cache key prefix
public string $key_prefix
리턴 string

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

Valid cache drivers
protected array $valid_drivers
리턴 array