/** * @covers WANObjectCache::get() * @covers WANObjectCache::makeGlobalKey() */ public function testGetNotExists() { $key = $this->cache->makeGlobalKey('y', wfRandomString(), 'p'); $curTTL = null; $value = $this->cache->get($key, $curTTL); $this->assertFalse($value, "Non-existing key has false value"); $this->assertNull($curTTL, "Non-existing key has null current TTL"); }
/** * @since 1.27 * @param WANObjectCache $cache * @return string */ protected function getCacheKey(WANObjectCache $cache) { return $cache->makeGlobalKey('user', 'id', wfWikiID(), $this->mId); }