PHP Класс Neos\Flow\Cache\CacheManager

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cacheConfigurations array
$cacheFactory CacheFactory
$caches array
$configurationManager Neos\Flow\Configuration\ConfigurationManager
$environment Neos\Flow\Utility\Environment
$persistentCaches array
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Открытые методы

Метод Описание
flushCaches ( boolean $flushPersistentCaches = false ) : void Flushes all registered caches
flushCachesByTag ( string $tag, boolean $flushPersistentCaches = false ) : void Flushes entries tagged by the specified tag of all registered caches.
flushSystemCachesByChangedFiles ( string $fileMonitorIdentifier, array $changedFiles ) : void Flushes entries tagged with class names if their class source files have changed.
getCache ( string $identifier ) : Neos\Cache\Frontend\FrontendInterface Returns the cache specified by $identifier
getCacheConfigurations ( ) : array Returns an array of cache configurations, indexed by cache identifier
getClassTag ( string $className = '' ) : string Renders a tag which can be used to mark a cache entry as "depends on this class".
hasCache ( string $identifier ) : boolean Checks if the specified cache has been registered.
injectCacheFactory ( CacheFactory $cacheFactory ) : void
injectConfigurationManager ( ConfigurationManager $configurationManager ) : void
injectEnvironment ( Environment $environment ) : void
injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
isCachePersistent ( string $identifier ) : boolean Checks if the specified cache is marked as "persistent".
registerCache ( Neos\Cache\Frontend\FrontendInterface $cache, boolean $persistent = false ) : void Registers a cache so it can be retrieved at a later point.
setCacheConfigurations ( array $cacheConfigurations ) : void Sets configurations for caches. The key of each entry specifies the cache identifier and the value is an array of configuration options.

Защищенные методы

Метод Описание
createAllCaches ( ) : void Instantiates all registered caches.
createCache ( string $identifier ) : void Instantiates the cache for $identifier.
flushClassCachesByChangedFiles ( array $changedFiles ) : void Flushes entries tagged with class names if their class source files have changed.
flushConfigurationCachesByChangedFiles ( array $changedFiles ) : void Flushes caches as needed if settings, routes or policies have changed
flushTranslationCachesByChangedFiles ( array $changedFiles ) : void Flushes I18n caches if translation files have changed

Описание методов

createAllCaches() защищенный Метод

Instantiates all registered caches.
protected createAllCaches ( ) : void
Результат void

createCache() защищенный Метод

Instantiates the cache for $identifier.
protected createCache ( string $identifier ) : void
$identifier string
Результат void

flushCaches() публичный Метод

Flushes all registered caches
public flushCaches ( boolean $flushPersistentCaches = false ) : void
$flushPersistentCaches boolean If set to TRUE, even those caches which are flagged as "persistent" will be flushed
Результат void

flushCachesByTag() публичный Метод

Flushes entries tagged by the specified tag of all registered caches.
public flushCachesByTag ( string $tag, boolean $flushPersistentCaches = false ) : void
$tag string Tag to search for
$flushPersistentCaches boolean If set to TRUE, even those caches which are flagged as "persistent" will be flushed
Результат void

flushClassCachesByChangedFiles() защищенный Метод

Flushes entries tagged with class names if their class source files have changed.
См. также: flushSystemCachesByChangedFiles()
protected flushClassCachesByChangedFiles ( array $changedFiles ) : void
$changedFiles array A list of full paths to changed files
Результат void

flushConfigurationCachesByChangedFiles() защищенный Метод

Flushes caches as needed if settings, routes or policies have changed
См. также: flushSystemCachesByChangedFiles()
protected flushConfigurationCachesByChangedFiles ( array $changedFiles ) : void
$changedFiles array A list of full paths to changed files
Результат void

flushSystemCachesByChangedFiles() публичный Метод

Also flushes AOP proxy caches if a policy was modified. This method is used as a slot for a signal sent by the system file monitor defined in the bootstrap scripts. Note: Policy configuration handling is implemented here as well as other parts of Flow (like the security framework) are not fully initialized at the time needed.
public flushSystemCachesByChangedFiles ( string $fileMonitorIdentifier, array $changedFiles ) : void
$fileMonitorIdentifier string Identifier of the File Monitor
$changedFiles array A list of full paths to changed files
Результат void

flushTranslationCachesByChangedFiles() защищенный Метод

Flushes I18n caches if translation files have changed
См. также: flushSystemCachesByChangedFiles()
protected flushTranslationCachesByChangedFiles ( array $changedFiles ) : void
$changedFiles array A list of full paths to changed files
Результат void

getCache() публичный Метод

Returns the cache specified by $identifier
public getCache ( string $identifier ) : Neos\Cache\Frontend\FrontendInterface
$identifier string Identifies which cache to return
Результат Neos\Cache\Frontend\FrontendInterface The specified cache frontend

getCacheConfigurations() публичный Метод

Returns an array of cache configurations, indexed by cache identifier
public getCacheConfigurations ( ) : array
Результат array

getClassTag() публичный статический Метод

Whenever the specified class is modified, all cache entries tagged with the class are flushed. If an empty string is specified as class name, the returned tag means "this cache entry becomes invalid if any of the known classes changes".
Устаревший: Unused and described functionality does not exist.
public static getClassTag ( string $className = '' ) : string
$className string The class name
Результат string Class Tag

hasCache() публичный Метод

Checks if the specified cache has been registered.
public hasCache ( string $identifier ) : boolean
$identifier string The identifier of the cache
Результат boolean TRUE if a cache with the given identifier exists, otherwise FALSE

injectCacheFactory() публичный Метод

public injectCacheFactory ( CacheFactory $cacheFactory ) : void
$cacheFactory CacheFactory
Результат void

injectConfigurationManager() публичный Метод

public injectConfigurationManager ( ConfigurationManager $configurationManager ) : void
$configurationManager Neos\Flow\Configuration\ConfigurationManager
Результат void

injectEnvironment() публичный Метод

public injectEnvironment ( Environment $environment ) : void
$environment Neos\Flow\Utility\Environment
Результат void

injectSystemLogger() публичный Метод

public injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
$systemLogger Neos\Flow\Log\SystemLoggerInterface
Результат void

isCachePersistent() публичный Метод

Checks if the specified cache is marked as "persistent".
public isCachePersistent ( string $identifier ) : boolean
$identifier string The identifier of the cache
Результат boolean TRUE if the specified cache is persistent, FALSE if it is not, or if the cache does not exist

registerCache() публичный Метод

Registers a cache so it can be retrieved at a later point.
public registerCache ( Neos\Cache\Frontend\FrontendInterface $cache, boolean $persistent = false ) : void
$cache Neos\Cache\Frontend\FrontendInterface The cache frontend to be registered
$persistent boolean
Результат void

setCacheConfigurations() публичный Метод

Possible options are: frontend backend backendOptions persistent If one of the options is not specified, the default value is assumed. Existing cache configurations are preserved.
public setCacheConfigurations ( array $cacheConfigurations ) : void
$cacheConfigurations array The cache configurations to set
Результат void

Описание свойств

$cacheConfigurations защищенное свойство

protected array $cacheConfigurations
Результат array

$cacheFactory защищенное свойство

protected CacheFactory,Neos\Flow\Cache $cacheFactory
Результат CacheFactory

$caches защищенное свойство

protected array $caches
Результат array

$configurationManager защищенное свойство

protected ConfigurationManager,Neos\Flow\Configuration $configurationManager
Результат Neos\Flow\Configuration\ConfigurationManager

$environment защищенное свойство

protected Environment,Neos\Flow\Utility $environment
Результат Neos\Flow\Utility\Environment

$persistentCaches защищенное свойство

protected array $persistentCaches
Результат array

$systemLogger защищенное свойство

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface