コード例 #1
0
ファイル: KatchingTest.php プロジェクト: fwartner/katching
 /** @test */
 public function it_caches_the_given_key()
 {
     $post = $this->makePost();
     $cache = new \Illuminate\Cache\Repository(new \Illuminate\Cache\ArrayStore());
     $cache = new Katching($cache);
     $cache->put($post, '<div>view fragment</div>');
     $this->assertTrue($cache->has($post->getCacheKey()));
     $this->assertTrue($cache->has($post));
 }
コード例 #2
0
ファイル: Directive.php プロジェクト: fwartner/katching
 /**
  * Handle the @endcache teardown.
  */
 public function teardown()
 {
     return $this->cache->put(array_pop($this->keys), ob_get_clean());
 }