MediaWiki  master
ICacheHelper.php
Go to the documentation of this file.
1 <?php
31 interface ICacheHelper {
38  public function setCacheEnabled( $cacheEnabled );
39 
49  public function startCache( $cacheExpiry = null, $cacheEnabled = null );
50 
65  public function getCachedValue( $computeFunction, $args = [], $key = null );
66 
73  public function saveCache();
74 
83  public function setExpiry( $cacheExpiry );
84 }
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:31
$args
if( $line===false) $args
Definition: mcc.php:124
ICacheHelper\saveCache
saveCache()
Saves the HTML to the cache in case it got recomputed.
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.