Download the PHP package themeplate/cache without Composer
On this page you can find all versions of the php package themeplate/cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download themeplate/cache
More information about themeplate/cache
Files in themeplate/cache
Download themeplate/cache
More information about themeplate/cache
Files in themeplate/cache
Vendor themeplate
Package cache
Short Description Convenient fragment caching methods
License GPL-3.0-only
Package cache
Short Description Convenient fragment caching methods
License GPL-3.0-only
Please rate this library. Is it a good library?
Informations about the package cache
ThemePlate Cache
Usage
Force refresh value/s
<WP_HOME>/?tcs_refresh=<single_key>
<WP_HOME>/?tcs_refresh[]=<key1>&tcs_refresh[]=<key2>
works only when logged-in
Cache::remember( $key, $callback, $expiration )
Retrieve content from the cache or, if it doesn't exist, execute $callback and its result is returned then saved
- $key (string)(Required) Unique cache key to use
- $callback (callable)(Required) Function that returns data to store
- $expiration (int)(Optional) Number of seconds before entry expires. Default 0 (forever)
Cache::forget( $key, $default )
Retrieve and delete the cache
- $key (string)(Required) Unique cache key to use
- $default (mixed)(Optional) To return if cache doesn't exist. Default
null
Cache::file( $key, $path )
Like remember
but, uses the file contents and no expiration, automatically updates if the file is modified instead
- $key (string)(Required) Unique cache key to use
- $path (string)(Required) Path of the file to read
Cache::processor()
Support for soft-expiration, Cache::remember
* and Cache::file
updates in the background
*Except for using anonymous function as callback (closure)
All versions of cache with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4|^8.2
The package themeplate/cache contains the following files
Loading the files please wait ....