PHP 클래스 Pimcore\Cache

파일 보기 프로젝트 열기: pimcore/pimcore 1 사용 예제들

공개 프로퍼티들

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_clearTagsOnShutdown array Items having tags which are in this array are cleared on shutdown \Pimcore::shutdown(); This is especially for the output-cache
$blackHoleCache Zend_Cache_Core
$enabled boolean
$forceImmediateWrite boolean if set to truq items are directly written into the cache, and do not get into the queue
$writeLockTimestamp integer contains the timestamp of the writeLockTime from the current process this is to recheck when removing the write lock (if the value is different -> higher) do not remove the lock because then another process has acquired a lock

공개 메소드들

메소드 설명
addClearTagOnShutdown ( $tag ) : void Adds a tag to the shutdown queue, see clearTagsOnShutdown
addClearedTag ( string $tag )
addIgnoredTagOnClear ( $tag ) : void
clearAll ( ) : void Empty the cache
clearSaveStack ( )
clearTag ( string $tag ) : void Removes entries from the cache matching the given tag
clearTags ( array $tags = [] ) : void Removes entries from the cache matching the given tags
clearTagsOnShutdown ( ) : void Clears all tags stored in self::$_clearTagsOnShutdown, this function is executed in \Pimcore::shutdown()
disable ( ) : void Disables the complete pimcore cache
enable ( ) : void
getBlackHoleCache ( ) : Zend_Cache_Core | Zend_Cache_Frontend
getDefaultCache ( ) : Zend_Cache_Core | Zend_Cache_Frontend
getDefaultConfig ( string | null $adapter = null ) : array
getForceImmediateWrite ( ) : boolean
getInstance ( ) : Zend_Cache_Core | Zend_Cache_Frontend Returns a instance of the cache, if the instance isn't available it creates a new one
hasWriteLock ( ) : boolean
init ( )
initializeCache ( $config ) : Zend_Cache_Core | Zend_Cache_Frontend
load ( string $key, $doNotTestCacheValidity = false ) : mixed Returns the content of the requested cache entry
maintenance ( )
remove ( $key )
removeIgnoredTagOnClear ( $tag ) : void
removeWriteLock ( )
save ( $data, $key, array $tags = [], null $lifetime = null, integer $priority, boolean $force = false ) : boolean | void
setForceImmediateWrite ( boolean $forceImmediateWrite )
setWriteLock ( $force = false )
setZendFrameworkCaches ( null $cache = null )
test ( string $key ) : integer | boolean Get the last modified time for the requested cache entry
write ( ) : void Write the stack to the cache

보호된 메소드들

메소드 설명
normalizeConfig ( $config ) : mixed
storeToCache ( $data, $key, array $tags = [], null $lifetime = null, boolean $force = false ) : boolean | void Write's an item to the cache // don't use the logger inside here

메소드 상세

addClearTagOnShutdown() 공개 정적인 메소드

Adds a tag to the shutdown queue, see clearTagsOnShutdown
public static addClearTagOnShutdown ( $tag ) : void
$tag
리턴 void

addClearedTag() 공개 정적인 메소드

public static addClearedTag ( string $tag )
$tag string

addIgnoredTagOnClear() 공개 정적인 메소드

public static addIgnoredTagOnClear ( $tag ) : void
$tag
리턴 void

clearAll() 공개 정적인 메소드

Empty the cache
public static clearAll ( ) : void
리턴 void

clearSaveStack() 공개 메소드

public clearSaveStack ( )

clearTag() 공개 정적인 메소드

Removes entries from the cache matching the given tag
public static clearTag ( string $tag ) : void
$tag string
리턴 void

clearTags() 공개 정적인 메소드

Removes entries from the cache matching the given tags
public static clearTags ( array $tags = [] ) : void
$tags array
리턴 void

clearTagsOnShutdown() 공개 정적인 메소드

Clears all tags stored in self::$_clearTagsOnShutdown, this function is executed in \Pimcore::shutdown()
public static clearTagsOnShutdown ( ) : void
리턴 void

disable() 공개 정적인 메소드

Disables the complete pimcore cache
public static disable ( ) : void
리턴 void

enable() 공개 정적인 메소드

public static enable ( ) : void
리턴 void

getBlackHoleCache() 공개 정적인 메소드

public static getBlackHoleCache ( ) : Zend_Cache_Core | Zend_Cache_Frontend
리턴 Zend_Cache_Core | Zend_Cache_Frontend

getDefaultCache() 공개 정적인 메소드

public static getDefaultCache ( ) : Zend_Cache_Core | Zend_Cache_Frontend
리턴 Zend_Cache_Core | Zend_Cache_Frontend

getDefaultConfig() 공개 정적인 메소드

public static getDefaultConfig ( string | null $adapter = null ) : array
$adapter string | null
리턴 array

getForceImmediateWrite() 공개 정적인 메소드

public static getForceImmediateWrite ( ) : boolean
리턴 boolean

getInstance() 공개 정적인 메소드

Returns a instance of the cache, if the instance isn't available it creates a new one
public static getInstance ( ) : Zend_Cache_Core | Zend_Cache_Frontend
리턴 Zend_Cache_Core | Zend_Cache_Frontend

hasWriteLock() 공개 정적인 메소드

public static hasWriteLock ( ) : boolean
리턴 boolean

init() 공개 정적인 메소드

public static init ( )

initializeCache() 공개 정적인 메소드

public static initializeCache ( $config ) : Zend_Cache_Core | Zend_Cache_Frontend
$config
리턴 Zend_Cache_Core | Zend_Cache_Frontend

load() 공개 정적인 메소드

Returns the content of the requested cache entry
public static load ( string $key, $doNotTestCacheValidity = false ) : mixed
$key string
리턴 mixed

maintenance() 공개 정적인 메소드

public static maintenance ( )

normalizeConfig() 보호된 정적인 메소드

protected static normalizeConfig ( $config ) : mixed
$config
리턴 mixed

remove() 공개 정적인 메소드

public static remove ( $key )
$key

removeIgnoredTagOnClear() 공개 정적인 메소드

public static removeIgnoredTagOnClear ( $tag ) : void
$tag
리턴 void

removeWriteLock() 공개 정적인 메소드

public static removeWriteLock ( )

save() 공개 정적인 메소드

public static save ( $data, $key, array $tags = [], null $lifetime = null, integer $priority, boolean $force = false ) : boolean | void
$data
$key
$tags array
$lifetime null
$priority integer
$force boolean
리턴 boolean | void

setForceImmediateWrite() 공개 정적인 메소드

public static setForceImmediateWrite ( boolean $forceImmediateWrite )
$forceImmediateWrite boolean

setWriteLock() 공개 정적인 메소드

public static setWriteLock ( $force = false )

setZendFrameworkCaches() 공개 정적인 메소드

public static setZendFrameworkCaches ( null $cache = null )
$cache null

storeToCache() 보호된 정적인 메소드

Write's an item to the cache // don't use the logger inside here
protected static storeToCache ( $data, $key, array $tags = [], null $lifetime = null, boolean $force = false ) : boolean | void
$data
$key
$tags array
$lifetime null
$force boolean
리턴 boolean | void

test() 공개 정적인 메소드

Get the last modified time for the requested cache entry
public static test ( string $key ) : integer | boolean
$key string Cache key
리턴 integer | boolean Last modified time of cache entry if it is available, false otherwise

write() 공개 정적인 메소드

Write the stack to the cache
public static write ( ) : void
리턴 void

프로퍼티 상세

$_clearTagsOnShutdown 보호되어 있는 정적으로 프로퍼티

Items having tags which are in this array are cleared on shutdown \Pimcore::shutdown(); This is especially for the output-cache
protected static array $_clearTagsOnShutdown
리턴 array

$blackHoleCache 보호되어 있는 정적으로 프로퍼티

protected static Zend_Cache_Core $blackHoleCache
리턴 Zend_Cache_Core

$cachePrefix 공개적으로 정적으로 프로퍼티

prefix which will be added to every item-key
public static string $cachePrefix
리턴 string

$clearedTagsStack 공개적으로 정적으로 프로퍼티

Contains the tags which were already cleared
public static array $clearedTagsStack
리턴 array

$defaultLifetime 공개적으로 정적으로 프로퍼티

public static null $defaultLifetime
리턴 null

$enabled 보호되어 있는 정적으로 프로퍼티

protected static bool $enabled
리턴 boolean

$forceImmediateWrite 보호되어 있는 정적으로 프로퍼티

if set to truq items are directly written into the cache, and do not get into the queue
protected static bool $forceImmediateWrite
리턴 boolean

$ignoredTagsOnClear 공개적으로 정적으로 프로퍼티

items having one of the tags in this store are not cleared when calling self::clearTags() or self::clearTag()
public static array $ignoredTagsOnClear
리턴 array

$instance 공개적으로 정적으로 프로퍼티

Instance of the used cache-implementation
public static Zend_Cache_Core|Zend_Cache_Frontend $instance
리턴 Zend_Cache_Core | Zend_Cache_Frontend

$logger 공개적으로 정적으로 프로퍼티

Contains the Logger, this is necessary because otherwise logging doesn't work in shutdown (missing reference)
public static Logger,pimcore $logger
리턴 Logger

$maxWriteToCacheItems 공개적으로 정적으로 프로퍼티

How many items should stored to the cache within one process
public static int $maxWriteToCacheItems
리턴 integer

$saveStack 공개적으로 정적으로 프로퍼티

Contains the items which should be written to the cache on shutdown. They are ordered respecting the priority
public static array $saveStack
리턴 array

$writeLockTimestamp 보호되어 있는 정적으로 프로퍼티

contains the timestamp of the writeLockTime from the current process this is to recheck when removing the write lock (if the value is different -> higher) do not remove the lock because then another process has acquired a lock
protected static int $writeLockTimestamp
리턴 integer