1

So as it's know xcache is not working under CLI but still want to test some functionality what is related partially to xcache under symfony2. Having the following snippet

//this is a working snippet 
$key = 'likes';
$cache = $this->getXcacheCache();
if ($cache->contains($key)) {
    $likes = $cache->fetch($key);
} elseif ($profile = $this->getProfile()) {
    $likes = $this->getProfile()->getProperty('likes');
    $cache->save($key, $likes, 3600);
}

Is there a way to unit test xcache if contains a specific key and run other tests based on this condition?

Sander de Jong
  • 351
  • 6
  • 18
fefe
  • 8,755
  • 27
  • 104
  • 180

0 Answers0