示例#1
0
 /**
  * @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");
 }
示例#2
0
 /**
  * @since 1.27
  * @param WANObjectCache $cache
  * @return string
  */
 protected function getCacheKey(WANObjectCache $cache)
 {
     return $cache->makeGlobalKey('user', 'id', wfWikiID(), $this->mId);
 }