1: <?php
2:
3: /**
4: * This file is part of the Nette Framework.
5: *
6: * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
7: *
8: * This source file is subject to the "Nette license", and/or
9: * GPL license. For more information please see http://nette.org
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: