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

Public Member Functions

 get ($key, $modified_time=0)
 
 put ($key, $obj, $valid_time=0)
 
 isValid ($key, $modified_time=0)
 
 isSupport ()
 
 truncate ()
 

Public Attributes

 $valid_time = 36000
 

Detailed Description

Base class of Cache

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

Definition at line 286 of file CacheHandler.class.php.

Member Function Documentation

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

Get cached data

Parameters
string$keyCache key
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 302 of file CacheHandler.class.php.

CacheBase::isSupport ( )

Return whether support or not support cache

Returns
boolean

Definition at line 340 of file CacheHandler.class.php.

CacheBase::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 330 of file CacheHandler.class.php.

CacheBase::put (   $key,
  $obj,
  $valid_time = 0 
)

Put data into cache

Parameters
string$keyCache key
mixed$objValue of a variable to store. $value supports all data types except resources, such as file handlers.
int$valid_timeTime for the variable to live in the cache in seconds. After the value specified in ttl has passed the stored variable will be deleted from the cache. If no ttl is supplied, use the default valid time.
Returns
bool|void Returns true on success or false on failure. If use CacheFile, returns void.

Definition at line 317 of file CacheHandler.class.php.

CacheBase::truncate ( )

Truncate all cache

Returns
bool|void Returns true on success or false on failure. If use CacheFile, returns void.

Definition at line 350 of file CacheHandler.class.php.

Member Data Documentation

CacheBase::$valid_time = 36000

Definition at line 292 of file CacheHandler.class.php.


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