XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Attributes | List of all members
CacheApc Class Reference
Inheritance diagram for CacheApc:
CacheBase

Public Member Functions

 getInstance ($opt=null)
 
 __construct ()
 
 isSupport ()
 
 put ($key, $buff, $valid_time=0)
 
 isValid ($key, $modified_time=0)
 
 get ($key, $modified_time=0)
 
 delete ($key)
 
 truncate ()
 
 _delete ($key)
 
- Public Member Functions inherited from CacheBase
 get ($key, $modified_time=0)
 
 put ($key, $obj, $valid_time=0)
 
 isValid ($key, $modified_time=0)
 
 isSupport ()
 
 truncate ()
 

Static Public Attributes

static $isSupport = false
 

Additional Inherited Members

- Public Attributes inherited from CacheBase
 $valid_time = 36000
 

Detailed Description

Cache class for APC

Author
NAVER (devel.nosp@m.oper.nosp@m.@xpre.nosp@m.ssen.nosp@m.gine..nosp@m.com)

Definition at line 9 of file CacheApc.class.php.

Constructor & Destructor Documentation

CacheApc::__construct ( )

Constructor

Returns
void

Definition at line 33 of file CacheApc.class.php.

Member Function Documentation

CacheApc::_delete (   $key)

Definition at line 145 of file CacheApc.class.php.

CacheApc::delete (   $key)

Delete variable from the cache

Parameters
string$keyUsed to store the value.
Returns
void

Definition at line 126 of file CacheApc.class.php.

CacheApc::get (   $key,
  $modified_time = 0 
)

Fetch a stored variable from the cache

Parameters
string$keyThe $key used to store the value.
int$modified_timeUnix time of data modified. If stored time is older then modified time, return false.
Returns
false|mixed Return false on failure or older then modified time. Return the string associated with the $key on success.

Definition at line 102 of file CacheApc.class.php.

CacheApc::getInstance (   $opt = null)

Get instance of CacheApc

Parameters
void$optNot used
Returns
CacheApc instance of CacheApc

Definition at line 19 of file CacheApc.class.php.

CacheApc::isSupport ( )

Return whether support or not support cache

Returns
bool Return true on support or false on not support

Definition at line 42 of file CacheApc.class.php.

CacheApc::isValid (   $key,
  $modified_time = 0 
)

Return whether cache is valid or invalid

Parameters
string$keyCache key
int$modified_timeUnix time of data modified. If stored time is older then modified time, the data is invalid.
Returns
bool Return true on valid or false on invalid.

Definition at line 75 of file CacheApc.class.php.

CacheApc::put (   $key,
  $buff,
  $valid_time = 0 
)

Cache a variable in the data store

Parameters
string$keyStore the variable using this name. $key are cache-unique, so storing a second value with the same $key will overwrite the original value.
mixed$buffThe variable to store
int$valid_timeTime To Live; store $buff in the cache for ttl seconds. After the ttl has passed., the stored variable will be expunged from the cache (on the next request). If no ttl is supplied, use the default valid time CacheApc::valid_time.
Returns
bool Returns true on success or false on failure.

Definition at line 57 of file CacheApc.class.php.

CacheApc::truncate ( )

Truncate all existing variables at the cache

Returns
bool Returns true on success or false on failure.

Definition at line 137 of file CacheApc.class.php.

Member Data Documentation

CacheApc::$isSupport = false
static

Definition at line 11 of file CacheApc.class.php.


The documentation for this class was generated from the following file: