public function testGetReturnsResultEvenIfNoMetaphoreValueObjectStored() { $cache = new Cache(new MockStore()); $key = 'dimaria7'; $value = 'Man Utd, not Real'; $cache->setResult($key, $value, new Ttl(30)); $result = $cache->getValue($key); $this->assertTrue($result instanceof \Metaphore\Value); $this->assertSame($value, $result->getResult()); }
/** * @see CacheAdapterInterface::cache() */ public function cache($key, callable $callable, $ttl) { return $this->backend->cache($this->prefix . $key, $callable, $ttl); }