Don't use deprecated wfMemcKey() or wfGlobalCacheKey()

Change-Id: I7fe5a45226a92ef19c25790a800a7ae7b7a3a57a
This commit is contained in:
Kunal Mehta 2018-01-10 19:50:06 +05:30
parent f5a195a3db
commit 82584edd0e
2 changed files with 2 additions and 2 deletions

View file

@ -22,8 +22,8 @@ class ApiScribuntoConsole extends ApiBase {
$sessionId = mt_rand( 0, 0x7fffffff );
}
$sessionKey = wfMemcKey( 'scribunto-console', $this->getUser()->getId(), $sessionId );
$cache = ObjectCache::getInstance( CACHE_ANYTHING );
$sessionKey = $cache->makeKey( 'scribunto-console', $this->getUser()->getId(), $sessionId );
$session = null;
$sessionIsNew = false;
if ( $params['session'] ) {

View file

@ -345,7 +345,7 @@ abstract class Scribunto_LuaEngine extends ScribuntoEngineBase {
throw new MWException( 'Lua file does not exist: ' . $fileName );
}
$cacheKey = wfGlobalCacheKey( __CLASS__, $fileName );
$cacheKey = $cache->makeGlobalKey( __CLASS__, $fileName );
$fileData = $cache->get( $cacheKey );
$code = false;