public function set($value)
{
$this->value = $value;
$this->hasValue = true;
$this->callable = null;
return $this;
}
public function testHit() { $item = new CacheItem('test_key'); $this->assertFalse($item->isHit()); $item->set('foobar'); $this->assertTrue($item->isHit()); $item->set(null); $this->assertTrue($item->isHit()); $item->expiresAfter(5); $this->assertTrue($item->isHit()); $item->expiresAfter(-1); $this->assertFalse($item->isHit()); }