loadFromCache() public method

Get data from the cache
public loadFromCache ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The event instance
Beispiel #1
0
 /**
  * @covers Imbo\EventListener\MetadataCache::loadFromCache
  */
 public function testDeletesInvalidCachedData()
 {
     $this->cache->expects($this->once())->method('get')->with($this->isType('string'))->will($this->returnValue(['lastModified' => 'preformatted date', 'metadata' => ['key' => 'value']]));
     $this->cache->expects($this->once())->method('delete')->with($this->isType('string'));
     $this->responseHeaders->expects($this->once())->method('set')->with('X-Imbo-MetadataCache', 'Miss');
     $this->response->expects($this->never())->method('setModel');
     $this->listener->loadFromCache($this->event);
 }