Stud.IP  5.4
StudipMemoryCache Class Reference
Inheritance diagram for StudipMemoryCache:
StudipCache

Public Member Functions

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

Static Public Member Functions

static getDisplayName ()
 
static getConfig ()
 

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()

expire (   $key)

Expires just a single key.

Parameters
stringthe key

Implements StudipCache.

◆ flush()

flush ( )

Expire all items from the cache.

Implements StudipCache.

◆ getConfig()

static getConfig ( )
static

Return the Vue component name and props that handle configuration. The associative array is of the form [ 'component' => <Vue component="" name>="">, 'props' => <Properties for="" component>=""> ]

Returns
array

Implements StudipCache.

◆ getDisplayName()

static getDisplayName ( )
static
Returns
string A translateable display name for this cache class.

Implements StudipCache.

◆ getStats()

getStats ( )

Get some statistics from cache, like number of entries, hit rate or whatever the underlying cache provides. Results are returned in form of an array like "[ [ 'name' => <displayable name>=""> 'value' =>

] ]"

Returns
array

Implements StudipCache.

◆ read()

read (   $key)

Reads just a single key from the cache.

Parameters
stringthe key
Returns
mixed the corresponding value

Implements StudipCache.

◆ write()

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

$memory_cache = []
protected

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