Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

ZurmoCache Class Reference

Inheritance diagram for ZurmoCache:
AllPermissionsOptimizationCache GeneralCache PermissionsCache RedBeanModelsCache BeanModelCache PoliciesCache RightsCache

Static Public Member Functions

static getCachePrefix ($identifier)
static setAdditionalStringForCachePrefix ($prefix= '')
static getAdditionalStringForCachePrefix ()
static supportsAndAllowsMemcache ()
static supportsAndAllowsPhpCaching ()
static supportsAndAllowsDatabaseCaching ()

Data Fields

const ALLOW_PHP_CACHING = true
const ALLOW_MEMCACHE_CACHING = true
const ALLOW_DB_CACHING = true
const CACHE_VALUE_KEY = 'value'
const CACHE_CHECKSUM_KEY = 'checksum'

Static Public Attributes

static $cacheType = 'Z:'

Static Protected Member Functions

static getCacheIncrementValue ($cacheType)
static setCacheIncrementValue ($cacheType, $value)
static incrementCacheIncrementValue ($cacheType)
static isIdentifierCacheIncrementValueName ($identifier)
static clearMemcacheCache ()
static cacheValueAndChecksum ($key, $value)
static getCachedValueAndValidateChecksum ($key)

Static Protected Attributes

static $cacheIncrementValueVariableName = 'CacheIncrementValue'
static $additionalStringForCachePrefix = ''

Detailed Description

This is a base caching class, that contains code related to caching. Memcache doesn't have option to remove data related just to one application or host, and that is why we had to implement methods that would simulate this feature. Please check this link for more details about this idea: http://stackoverflow.com/questions/1202174/memcache-invalidate-entries-according-to-a-pattern

Definition at line 44 of file ZurmoCache.php.


Member Function Documentation

static getCachePrefix ( identifier  )  [static]

Get cache prefix, based on ZURMO_TOKEN, $cacheIncrementValue and cache type. In case that we want to get just cache increment value, prefix will not contain increment value.

Parameters:
string $identifier
Returns:
string

Definition at line 68 of file ZurmoCache.php.

static getCacheIncrementValue ( cacheType  )  [static, protected]

Get curent increment value, based on $cacheType. Cache types can be: "G:" - for GlobalCache "M:" - for RedBeanModelsCache "P:" - for PermissionCache We need to distinct those cache types, because we should be able to forget only GlobalCache(increment cache increment value), while other two cache types will contain valid data.

Parameters:
string $cacheType
Returns:
int|mixed

Definition at line 98 of file ZurmoCache.php.

static setCacheIncrementValue ( cacheType,
value 
) [static, protected]
Parameters:
string $cacheType
mixed $value

Definition at line 116 of file ZurmoCache.php.

static incrementCacheIncrementValue ( cacheType  )  [static, protected]

Increment CacheIncrementValue

Parameters:
string $cacheType

Definition at line 125 of file ZurmoCache.php.

static isIdentifierCacheIncrementValueName ( identifier  )  [static, protected]

Check if identifier is same as static::$cacheIncrementValueVariableName.

Parameters:
$identifier 
Returns:
bool

Definition at line 137 of file ZurmoCache.php.

static setAdditionalStringForCachePrefix ( prefix = ''  )  [static]

Set additional prefix This is used to distinct memcache value for tests and for website, because test application and website application use same ZURMO_TOKEN. This prefix is empty for web application, and for tests it is set to "Test"

Parameters:
string $prefix

Definition at line 156 of file ZurmoCache.php.

static getAdditionalStringForCachePrefix (  )  [static]

Get additional prefix

Returns:
string

Definition at line 165 of file ZurmoCache.php.

static supportsAndAllowsMemcache (  )  [static]

Check if Memcache caching is allowed and supported

Definition at line 173 of file ZurmoCache.php.

static supportsAndAllowsPhpCaching (  )  [static]

Check if PHP caching is allowed and supported

Definition at line 181 of file ZurmoCache.php.

static supportsAndAllowsDatabaseCaching (  )  [static]

Check if DB caching is allowed and supported

Definition at line 189 of file ZurmoCache.php.

static clearMemcacheCache (  )  [static, protected]

Clear memcache cache if we support and allow memcache

Definition at line 197 of file ZurmoCache.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Mar 23 07:11:05 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8