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

Public Member Functions

 expire ($key)
 
 flush ()
 
 read ($key)
 
 write ($name, $content, $expires=self::DEFAULT_EXPIRATION)
 

Protected Attributes

 $memory_cache = []
 

Additional Inherited Members

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

Detailed Description

The php memory implementation of the StudipCache interface.

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 5.0

Member Function Documentation

expire (   $key)

Expires just a single key.

Parameters
stringthe key

Implements StudipCache.

flush ( )

Expire all items from the cache.

Implements StudipCache.

read (   $key)

Reads just a single key from the cache.

Parameters
stringthe key
Returns
mixed the corresponding value

Implements StudipCache.

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

Store data at the server.

Parameters
stringthe item's key.
mixedthe item's content (will be serialized if necessary).
intthe item's expiry time in seconds. Defaults to 12h.
Returns
mixed returns TRUE on success or FALSE on failure.

Implements StudipCache.

Field Documentation

$memory_cache = []
protected

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