Class \Prado\Caching\TCacheDependency
TCacheDependency class.
TCacheDependency is the base class implementing ICacheDependency interface. Descendant classes must implement ICacheDependency::getHasChanged() to provide actual dependency checking logic.
The property value of HasChanged tells whether the dependency is changed or not.
You may disable the dependency checking by setting \Prado\Caching\setEnabled() to false.
Note, since the dependency objects often need to be serialized so that they can persist across requests, you may need to implement __sleep() and __wakeup() if the dependency objects contain resource handles which are not serializable.
Currently, the following dependency classes are provided in the PRADO release:
- TFileCacheDependency: checks whether a file is changed or not
- TDirectoryCacheDependency: checks whether a directory is changed or not
- TGlobalStateCacheDependency: checks whether a global state is changed or not
- TChainedCacheDependency: checks whether any of a list of dependencies is changed or not
Class hierarchy
Author: Qiang Xue <qiang.xue@gmail.com>Since: 3.1.0
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |