protected function getAndLog($args) { $result = call_user_func_array(array($this->cache, 'get'), $args); $miss = $this->cache->isMiss(); $key = $this->cache->getKey(); if (isset($this->logger)) { $this->logger->logRequest($key, !$miss, $result); } return $result; }
private function assertDisabledStash(Item $stash) { $this->assertFalse($stash->set('true'), 'storeData returns false for disabled cache'); $this->assertNull($stash->get(), 'getData returns null for disabled cache'); $this->assertFalse($stash->clear(), 'clear returns false for disabled cache'); $this->assertTrue($stash->isMiss(), 'isMiss returns true for disabled cache'); $this->assertFalse($stash->extendCache(), 'extendCache returns false for disabled cache'); $this->assertTrue($stash->lock(100), 'lock returns true for disabled cache'); }