Lines Matching full:cache

12 use Twig\Cache\FilesystemCache;
75 'cache' => false,
191 $cache = new FilesystemCache($dir = sys_get_temp_dir().'/twig');
192 $options = ['cache' => $cache, 'auto_reload' => false, 'debug' => false];
197 $key = $cache->generateKey('index', $twig->getTemplateClass('index'));
198 $cache->write($key, $twig->compileSource(new Source('{{ foo }}', 'index')));
200 …/ check that extensions won't be initialized when rendering a template that is already in the cache
222 $cache = $this->getMockBuilder('\Twig\Cache\CacheInterface')->getMock();
224 … $twig = new Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]);
226 // Cache miss: getTimestamp returns 0 and as a result the load() is
228 $cache->expects($this->once())
231 $cache->expects($this->once())
236 $cache->expects($this->once())
238 $cache->expects($this->once())
249 $cache = $this->getMockBuilder('\Twig\Cache\CacheInterface')->getMock();
251 … $twig = new Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]);
255 // Cache hit: getTimestamp returns something > extension timestamps and
257 $cache->expects($this->once())
260 $cache->expects($this->once())
266 $cache->expects($this->atLeastOnce())
277 $cache = $this->getMockBuilder('\Twig\Cache\CacheInterface')->getMock();
279 … $twig = new Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]);
283 $cache->expects($this->once())
286 $cache->expects($this->once())
292 $cache->expects($this->once())
294 $cache->expects($this->once())