* it will be generated with the callback function (if present), and the newly
* calculated value will be stored to the cache in a wrapper.
*
- * @param BagOStuff $cache A cache object such as $wgMemc
+ * @param BagOStuff $cache A cache object
* @param string $key The cache key
* @param int $expiry The expiry timestamp or interval in seconds
* @param bool|callable $callback The callback for generating the value, or false
function loadDependencyValues() {
if ( is_null( $this->timestamp ) ) {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
# Dependency on a non-existent file stores "false"
# This is a valid concept!
$this->timestamp = filemtime( $this->filename );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
}
}
* @return bool
*/
function isExpired() {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$lastmod = filemtime( $this->filename );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $lastmod === false ) {
if ( $this->timestamp === false ) {
# Still nonexistent