1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: *
6: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
7: *
8: * For the full copyright and license information, please view
9: * the file license.txt that was distributed with this source code.
10: */
11:
12: namespace Nette\Templates;
13:
14: use Nette;
15:
16:
17:
18: /**
19: * Template cache storage.
20: *
21: * @author David Grudl
22: */
23: class TemplateCacheStorage extends Nette\Caching\FileStorage
24: {
25:
26: /**
27: * Reads cache data from disk.
28: * @param array
29: * @return mixed
30: */
31: protected function readData($meta)
32: {
33: return array(
34: 'file' => $meta[self::FILE],
35: 'handle' => $meta[self::HANDLE],
36: );
37: }
38:
39:
40:
41: /**
42: * Returns file name.
43: * @param string
44: * @return string
45: */
46: protected function getCacheFile($key)
47: {
48: return parent::getCacheFile($key) . '.php';
49: }
50:
51: }
52: