- // CACHE_ACCEL throws an exception if no suitable object cache is present, so fall
- // back to CACHE_ANYTHING.
- $cache = ObjectCache::newAccelerator( CACHE_ANYTHING );
- $key = wfMemcKey( 'template', $templateName, $fastHash );
+ $cache = ObjectCache::getLocalServerInstance( CACHE_ANYTHING );
+ $key = $cache->makeKey( 'template', $templateName, $fastHash );