New items are created by first get()-ing them from the pool. It would be inefficient to let such a get() immediately query the real cache (because it may not be meant to retrieve real data, but just to set a new value) Instead, every Item returned by get() will be a "placeholder", and once the values are actually needed, this object will be called to go do that (along with every other value that has not yet been resolved, while we're at it)
저자: Matthias Mullie (scrapbook@mullie.eu)
예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function isHit()
 {
     if ($this->isHit !== null) {
         return $this->isHit;
     }
     return $this->repository->exists($this->hash);
 }
예제 #2
0
파일: Item.php 프로젝트: Nyholm/scrapbook
 /**
  * {@inheritdoc}
  */
 public function isHit()
 {
     return $this->repository->exists($this->hash);
 }