rapila
Public Member Functions | Static Public Member Functions | List of all members
CacheKey Class Reference

Public Member Functions

 dependOnRequestParameter ($sVar)
 
 dependOnLanguage ()
 
 dependOnPath ($oNavigationItem=null)
 
 dependOnCustom ($sName, $mValue)
 
 dependOnUser ($iUser=false)
 
 dependOnLoggedIn ()
 
 render ($sPrefix= '')
 

Static Public Member Functions

static create ()
 

Detailed Description

Construct a sensible cache key that depends on a series of input variables

Member Function Documentation

static CacheKey::create ( )
static

Quickly create an instance

CacheKey::dependOnLanguage ( )

Make the cache key depend on the current session language

CacheKey::dependOnLoggedIn ( )

Depend this cache’s contents on whether or not a user is logged in

CacheKey::dependOnPath (   $oNavigationItem = null)

Make the cache key depend on a navigation item’s path.

Parameters
NavigationItem$oNavigationItemthe navigation item to be dependent on (defaults to the frontend manager’s current navigation item)
CacheKey::dependOnRequestParameter (   $sVar)

Make this cache key depend on a request param (or a series thereof).

Parameters
string… | array$sVarvariable names
CacheKey::dependOnUser (   $iUser = false)

Make the cache depend on the currently logged in user.

Parameters
User | int$iUserthe user this cache content depends on. Note: It might not be very efficient to cache user-dependent content on systems with a high number of distinct users
CacheKey::render (   $sPrefix = '')

Render this cache key into a string. An optional prefix will be prepended.


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