MediaWiki  1.34.0
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 }
ICacheHelper\startCache
startCache( $cacheExpiry=null, $cacheEnabled=null)
Initializes the caching.
ICacheHelper\setExpiry
setExpiry( $cacheExpiry)
Sets the time to live for the cache, in seconds or a unix timestamp indicating the point of expiry....
ICacheHelper
Interface for all classes implementing CacheHelper functionality.
Definition: ICacheHelper.php:30
ICacheHelper\saveCache
saveCache()
Saves the HTML to the cache in case it got recomputed.
$args
if( $line===false) $args
Definition: cdb.php:64
ICacheHelper\setCacheEnabled
setCacheEnabled( $cacheEnabled)
Sets if the cache should be enabled or not.
ICacheHelper\getCachedValue
getCachedValue( $computeFunction, $args=[], $key=null)
Get a cached value if available or compute it if not and then cache it if possible.