XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Attributes | List of all members
CacheWincache Class Reference
Inheritance diagram for CacheWincache:
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)
 
 delete ($key)
 
 truncate ()
 
- 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 Wincache

Wincache Handler

Author
Arnia (suppo.nosp@m.rt@x.nosp@m.press.nosp@m.engi.nosp@m.ne.or.nosp@m.g)

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

Constructor & Destructor Documentation

CacheWincache::__construct ( )

Constructor

Returns
void

Definition at line 35 of file CacheWincache.class.php.

Member Function Documentation

CacheWincache::_delete (   $_key)

Delete variable from the cache(private)

Parameters
string$_keyUsed to store the value.
Returns
void

Definition at line 128 of file CacheWincache.class.php.

CacheWincache::delete (   $key)

Delete variable from the cache

Parameters
string$keyUsed to store the value.
Returns
void

Definition at line 139 of file CacheWincache.class.php.

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

Gets a variable stored in the user cache

Parameters
string$keyThe $key that was used to store the variable in the cache.
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 104 of file CacheWincache.class.php.

CacheWincache::getInstance (   $opt = null)

Get instance of CacheWincache

Parameters
void$optNot used
Returns
CacheWincache instance of CacheWincache

Definition at line 21 of file CacheWincache.class.php.

CacheWincache::isSupport ( )

Return whether support or not support cache

Returns
bool Return true on support or false on not support

Definition at line 44 of file CacheWincache.class.php.

CacheWincache::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 77 of file CacheWincache.class.php.

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

Adds a variable in user cache and overwrites a variable if it already exists in the cache

Parameters
string$keyStore the variable using this $key value. If a variable with same $key is already present the function will overwrite the previous value with the new one.
mixed$buffValue 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 CacheWincache::valid_time.
Returns
bool Returns true on success or false on failure.

Definition at line 60 of file CacheWincache.class.php.

CacheWincache::truncate ( )

Truncate all existing variables at the cache

Returns
bool Returns true on success or false on failure.

Definition at line 150 of file CacheWincache.class.php.

Member Data Documentation

CacheWincache::$isSupport = false
static

Definition at line 13 of file CacheWincache.class.php.


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