Lines Matching full:cache
12 use Twig\Cache\FilesystemCache;
20 private $cache; variable in Twig_Tests_Cache_FilesystemTest
27 $this->cache = new FilesystemCache($this->directory);
39 $key = $this->directory.'/cache/cachefile.php';
49 $this->cache->load($key);
56 $key = $this->directory.'/cache/cachefile.php';
60 $this->cache->load($key);
67 $key = $this->directory.'/cache/cachefile.php';
73 $this->cache->write($key, $content);
82 * @expectedExceptionMessage Unable to create the cache directory
90 $key = $this->directory.'/cache/cachefile.php';
99 $this->cache->write($key, $content);
104 * @expectedExceptionMessage Unable to write in the cache directory
112 $key = $this->directory.'/cache/cachefile.php';
120 @mkdir($this->directory.'/cache', 0555);
121 $this->assertTrue(is_dir($this->directory.'/cache'));
123 $this->cache->write($key, $content);
128 * @expectedExceptionMessage Failed to write cache file
132 $key = $this->directory.'/cache/cachefile.php';
137 // Create a directory in the place of the cache file.
141 $this->cache->write($key, $content);
146 $key = $this->directory.'/cache/cachefile.php';
155 $this->assertSame(1234567890, $this->cache->getTimestamp($key));
160 $key = $this->directory.'/cache/cachefile.php';
161 $this->assertSame(0, $this->cache->getTimestamp($key));
165 * Test file cache is tolerant towards trailing (back)slashes on the configured cache directory.
171 $cache = new FilesystemCache($input);
172 $this->assertRegExp($expected, $cache->generateKey('_test_', \get_class($this)));