Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
StudipCacheProxy Class Reference
Inheritance diagram for StudipCacheProxy:
StudipCache

Public Member Functions

 __construct (StudipCache $cache, $proxy_these=['expire'])
 
 expire ($key)
 
 flush ()
 
 read ($key)
 
 write ($key, $content, $expires=self::DEFAULT_EXPIRATION)
 

Protected Attributes

 $actual_cache
 
 $proxy_these
 

Additional Inherited Members

- Data Fields inherited from StudipCache
const DEFAULT_EXPIRATION = 12 * 60 * 60
 

Detailed Description

Proxies a StudipCache and stores the expire operation in the database. These operations are lateron applied to the cache they should have been applied to in the beginning.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
Since
Stud.IP 3.3

Constructor & Destructor Documentation

__construct ( StudipCache  $cache,
  $proxy_these = ['expire'] 
)
Parameters
StudipCache$cacheThe actual cache object
mixed$proxy_theseList of operations to proxy (should be an array but a space seperated string is also valid)

Member Function Documentation

expire (   $key)

Expires just a single key.

Parameters
string$keyThe item's key

Implements StudipCache.

flush ( )

Expire all items from the cache.

Implements StudipCache.

read (   $key)

Reads just a single key from the cache.

Parameters
string$keyThe item's key
Returns
mixed The corresponding value

Implements StudipCache.

write (   $key,
  $content,
  $expires = self::DEFAULT_EXPIRATION 
)

Store data at the server.

Parameters
string$keyThe item's key
string$contentThe item's conten
int$expiresThe item's expiry time in seconds, defaults to 12h
Returns
bool Returns TRUE on success or FALSE on failure

Implements StudipCache.

Field Documentation

$actual_cache
protected
$proxy_these
protected

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