Public Member Functions | Protected Member Functions | Protected Attributes

MemcacheCache Class Reference

Inheritance diagram for MemcacheCache:
Collaboration diagram for MemcacheCache:

List of all members.

Public Member Functions

 __construct ()

Protected Member Functions

 _has ($name, $group)
 _has_group ($group)
 _get_group ($group)
 _get ($name, $group)
 _set ($name, $value, $expiry, $group, $keep)
 _expire ($name, $group, $match_mode= 'strict')
 _expired ($name, $group)
 _extend ($name, $expiry, $group)
 _purge ()

Protected Attributes

 $enabled = false
 $cache_index = array()

Detailed Description

Contains the MemcacheCache class

Stores cache data in Memcache

Definition at line 14 of file memcachecache.php.


Constructor & Destructor Documentation

MemcacheCache::__construct (  ) 

Constructor for MemcacheCache

Sets up paths etc. and reads cache index, if it exists.

Definition at line 24 of file memcachecache.php.


Member Function Documentation

MemcacheCache::_expire ( name,
group,
match_mode = 'strict' 
) [protected]

Expires the named value from the cache.

Parameters:
string $name The name of the cached item
string $group The name of the cache group
string $match_mode (optional) how to match bucket names ('strict', 'regex', 'glob') (default 'strict')

Definition at line 153 of file memcachecache.php.

MemcacheCache::_expired ( name,
group 
) [protected]

Return whether a named cache value has expired

Parameters:
string $name The name of the cached item
string $group The group of the cached item
Returns:
boolean true if the stored value has expired

Reimplemented from Cache.

Definition at line 205 of file memcachecache.php.

MemcacheCache::_extend ( name,
expiry,
group 
) [protected]

Extend the expiration of the named cached value.

Parameters:
string $name The name of the cached item
integer $expiry The duration in seconds to extend the cache expiration by

Reimplemented from Cache.

Definition at line 228 of file memcachecache.php.

MemcacheCache::_get ( name,
group 
) [protected]

Returns the named value from the cache.

Parameters:
string $name The name of the cached item
Returns:
mixed The item value or null if it doesn't exist in cache

Reimplemented from Cache.

Definition at line 114 of file memcachecache.php.

MemcacheCache::_get_group ( group  )  [protected]

Returns the group from the cache.

Parameters:
string $name The name of the cached item
Returns:
mixed The group or array() if it doesn't exist in cache

Reimplemented from Cache.

Definition at line 92 of file memcachecache.php.

Referenced by _expire().

MemcacheCache::_has ( name,
group 
) [protected]

Is record with $name in the cache?

Parameters:
string $name name of the cached item
Returns:
boolean true if item is cached, false if not

Reimplemented from Cache.

Definition at line 49 of file memcachecache.php.

MemcacheCache::_has_group ( group  )  [protected]

Is group in the cache?

Parameters:
string $group Name of the group to detect

For internal use only.

string $name name of the cached item

Returns:
boolean true if item is cached, false if not

Reimplemented from Cache.

Definition at line 68 of file memcachecache.php.

MemcacheCache::_purge (  )  [protected]

Remove all cache files

Definition at line 248 of file memcachecache.php.

MemcacheCache::_set ( name,
value,
expiry,
group,
keep 
) [protected]

A cache instance implements this to set the named value in the cache with an expiration.

Parameters:
string $name The name of the cached item
mixed $value The value to store
integer $expiry Number of second after the call that the cache will expire

Reimplemented from Cache.

Definition at line 127 of file memcachecache.php.


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