Provides a driver-based interface for finding, creating, and deleting cached resources. Caches are identified by a unique string. Tagging of caches is also supported, and caches can be found and deleted by id or tag.
This is the code documentation for the SproutCMS project
Search documentation |
class CacheProvides a driver-based interface for finding, creating, and deleting cached resources. Caches are identified by a unique string. Tagging of caches is also supported, and caches can be found and deleted by id or tag.
Variables
Functions
public __constructvoid $Cache->__construct ( [ array|string $config ] ); Loads the configured driver and validates it. public deleteboolean $Cache->delete ( string $id ); Delete a cache item by id. public deleteAllboolean $Cache->deleteAll ( ); Delete ALL cache items items. public deleteTagboolean $Cache->deleteTag ( string $tag ); Delete all cache items with a given tag. public findarray $Cache->find ( string $tag ); Fetches all of the caches for a given tag. An empty array will be returned when no matching caches are found. public getmixed $Cache->get ( string $id ); Fetches a cache by id. NULL is returned when a cache item is not found. public instanceCache Cache::instance ( [ string &$config ] ); Returns a singleton instance of Cache. protected sanitizeIdstring $Cache->sanitizeId ( string $id ); Replaces troublesome characters with underscores. public setboolean $Cache->set ( string $id , mixed $data [, array|string $tags [, integer $lifetime ]] ); Set a cache item by id. Tags may also be added and a custom lifetime can be set. Non-string data is automatically serialized. |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |