class Cache (View source)

Properties

static Zend_Cache_Core|Zend_Cache_Frontend $instance Instance of the used cache-implementation
static null $defaultLifetime
static array $saveStack Contains the items which should be written to the cache on shutdown. They are ordered respecting the priority
static Logger $logger Contains the Logger, this is necessary because otherwise logging doesn't work in shutdown (missing reference)
static array $clearedTagsStack Contains the tags which were already cleared
static int $maxWriteToCacheItems How many items should stored to the cache within one process
static string $cachePrefix prefix which will be added to every item-key
static array $ignoredTagsOnClear items having one of the tags in this store are not cleared when calling self::clearTags() or self::clearTag()

Methods

static Zend_Cache_Core|Zend_Cache_Frontend
getInstance()

Returns a instance of the cache, if the instance isn't available it creates a new one

static 
init()

No description

static Zend_Cache_Core|Zend_Cache_Frontend
initializeCache($config)

No description

static array
getDefaultConfig(string|null $adapter = null)

No description

static Zend_Cache_Core|Zend_Cache_Frontend
getDefaultCache()

No description

static Zend_Cache_Core|Zend_Cache_Frontend
getBlackHoleCache()

No description

static mixed
load($key, $doNotTestCacheValidity = false)

Returns the content of the requested cache entry

static int|bool
test(string $key)

Get the last modified time for the requested cache entry

static bool|void
save($data, $key, array $tags = array(), null $lifetime = null, int $priority, bool $force = false)

No description

clearSaveStack()

No description

static void
write()

Write the stack to the cache

static 
setWriteLock($force = false)

No description

static 
removeWriteLock()

No description

static bool
hasWriteLock()

No description

static 
remove($key)

No description

static void
clearAll()

Empty the cache

static void
clearTag(string $tag)

Removes entries from the cache matching the given tag

static void
clearTags(array $tags = array())

Removes entries from the cache matching the given tags

static void
addClearTagOnShutdown($tag)

Adds a tag to the shutdown queue, see clearTagsOnShutdown

static void
clearTagsOnShutdown()

Clears all tags stored in self::$_clearTagsOnShutdown, this function is executed in \Pimcore::shutdown()

static void
addIgnoredTagOnClear($tag)

No description

static void
removeIgnoredTagOnClear($tag)

No description

static 
addClearedTag(string $tag)

No description

static void
disable()

Disables the complete pimcore cache

static void
enable()

No description

static 
setZendFrameworkCaches(Zend_Cache_Core|null $cache = null)

No description

static 
setForceImmediateWrite(boolean $forceImmediateWrite)

No description

static boolean
getForceImmediateWrite()

No description

static 
maintenance()

No description

Details

at line line 105
static Zend_Cache_Core|Zend_Cache_Frontend getInstance()

Returns a instance of the cache, if the instance isn't available it creates a new one

Return Value

Zend_Cache_Core|Zend_Cache_Frontend

at line line 121
static init()

at line line 210
static Zend_Cache_Core|Zend_Cache_Frontend initializeCache($config)

Parameters

$config

Return Value

Zend_Cache_Core|Zend_Cache_Frontend

at line line 221
static array getDefaultConfig(string|null $adapter = null)

Parameters

string|null $adapter

Return Value

array

at line line 246
static Zend_Cache_Core|Zend_Cache_Frontend getDefaultCache()

Return Value

Zend_Cache_Core|Zend_Cache_Frontend

at line line 262
static Zend_Cache_Core|Zend_Cache_Frontend getBlackHoleCache()

Return Value

Zend_Cache_Core|Zend_Cache_Frontend

at line line 278
static mixed load($key, $doNotTestCacheValidity = false)

Returns the content of the requested cache entry

Parameters

$key
$doNotTestCacheValidity

Return Value

mixed

at line line 313
static int|bool test(string $key)

Get the last modified time for the requested cache entry

Parameters

string $key Cache key

Return Value

int|bool Last modified time of cache entry if it is available, false otherwise

at line line 346
static bool|void save($data, $key, array $tags = array(), null $lifetime = null, int $priority, bool $force = false)

Parameters

$data
$key
array $tags
null $lifetime
int $priority
bool $force

Return Value

bool|void

at line line 486
clearSaveStack()

at line line 496
static void write()

Write the stack to the cache

Return Value

void

at line line 526
static setWriteLock($force = false)

Parameters

$force

at line line 539
static removeWriteLock()

at line line 557
static bool hasWriteLock()

Return Value

bool

at line line 582
static remove($key)

Parameters

$key

at line line 604
static void clearAll()

Empty the cache

Return Value

void

at line line 632
static void clearTag(string $tag)

Removes entries from the cache matching the given tag

Parameters

string $tag

Return Value

void

at line line 643
static void clearTags(array $tags = array())

Removes entries from the cache matching the given tags

Parameters

array $tags

Return Value

void

at line line 696
static void addClearTagOnShutdown($tag)

Adds a tag to the shutdown queue, see clearTagsOnShutdown

Parameters

$tag

Return Value

void

at line line 709
static void clearTagsOnShutdown()

Clears all tags stored in self::$_clearTagsOnShutdown, this function is executed in \Pimcore::shutdown()

Return Value

void

at line line 734
static void addIgnoredTagOnClear($tag)

Parameters

$tag

Return Value

void

at line line 746
static void removeIgnoredTagOnClear($tag)

Parameters

$tag

Return Value

void

at line line 757
static addClearedTag(string $tag)

Parameters

string $tag

at line line 767
static void disable()

Disables the complete pimcore cache

Return Value

void

at line line 779
static void enable()

Return Value

void

at line line 789
static setZendFrameworkCaches(Zend_Cache_Core|null $cache = null)

Parameters

Zend_Cache_Core|null $cache

at line line 805
static setForceImmediateWrite(boolean $forceImmediateWrite)

Parameters

boolean $forceImmediateWrite

at line line 813
static boolean getForceImmediateWrite()

Return Value

boolean

at line line 818
static maintenance()