MediaWiki  master
ICacheHelper.php
Go to the documentation of this file.
1 <?php
30 interface ICacheHelper {
37  function setCacheEnabled( $cacheEnabled );
38 
48  function startCache( $cacheExpiry = null, $cacheEnabled = null );
49 
64  function getCachedValue( $computeFunction, $args = [], $key = null );
65 
72  function saveCache();
73 
82  function setExpiry( $cacheExpiry );
83 }
startCache( $cacheExpiry=null, $cacheEnabled=null)
Initializes the caching.
if( $line===false) $args
Definition: cdb.php:64
setExpiry( $cacheExpiry)
Sets the time to live for the cache, in seconds or a unix timestamp indicating the point of expiry...
setCacheEnabled( $cacheEnabled)
Sets if the cache should be enabled or not.
getCachedValue( $computeFunction, $args=[], $key=null)
Get a cached value if available or compute it if not and then cache it if possible.
saveCache()
Saves the HTML to the cache in case it got recomputed.
Interface for all classes implementing CacheHelper functionality.