Pix_Cache_Adapter_Array

uses \Pix_Cache_Adapter
package Cache
copyright 2003-2012 PIXNET Digital Media Corporation
license BSD License
version $id$

 Methods

__construct()

__construct($config) 

codeCoverageIgnore

Parameters

$config

add 新增一筆 cache

add(string $key, mixed $value, int | array $options) : bool

access public

Parameters

$key

string

$value

mixed

$options

intarray

Returns

bool如果 $key 已經存在,則會回傳 false

append 在 cache 的值後方加上 $data

append(string $key, string $data, int | array $options) : bool

access public

Parameters

$key

string

$data

string

$options

intarray

Returns

bool當 $key 不存在時,則會回傳 false

dec 對 cache 的值減少 $dec ,當原本的值不是數字時則視為 set()

dec(string $key, int $dec) : bool

access public

Parameters

$key

string

$dec

int

Returns

bool

delete 刪除一筆 cache

delete(string $key) : bool

access public

Parameters

$key

string

Returns

bool

get 取得一筆 cache

get(string $key) : string

access public

Parameters

$key

string

Returns

string

gets 取得多筆 cache 的值

gets(array $keys) : array

access public

Parameters

$keys

array

Returns

array

inc 對 cache 的值增加 $inc ,當原本的值不是數字時則視為 set()

inc(string $key, int $inc) : bool

access public

Parameters

$key

string

$inc

int

Returns

bool

load()

load($key) 
Inherited

inherited_from \Pix_Cache_Adapter::load()

Parameters

$key

prepend 在 cache 的值前方加上 $data

prepend(string $key, string $data, int | array $options) : bool

access public

Parameters

$key

string

$data

string

$options

intarray

Returns

bool當 $key 不存在時,則會回傳 false

remove()

remove($key) 
Inherited

inherited_from \Pix_Cache_Adapter::remove()

Parameters

$key

replace 取代一筆 cache

replace(string $key, mixed $value, int | array $options) : bool

access public

Parameters

$key

string

$value

mixed

$options

intarray

Returns

bool如果 $key 不存在,就會回傳 false

save()

save($key, $value, $options) 
Inherited

inherited_from \Pix_Cache_Adapter::save()

Parameters

$key

$value

$options

set 設定一筆 cache

set(string $key, mixed $value, int | array $options) : bool

access public

Parameters

$key

string

$value

mixed

$options

intarray

int: cache 過期的秒數, array(): 不會過期

Returns

bool

sets 一次指定多筆功能

sets(array $keys_values) : void
Inherited

access public
inherited_from \Pix_Cache_Adapter::sets()

Parameters

$keys_values

array

key, value 的 associate array