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: * @package Nette\Templates
11: */
12:
13:
14:
15: /**
16: * NTemplate cache storage.
17: *
18: * @author David Grudl
19: */
20: class NTemplateCacheStorage extends NFileStorage
21: {
22:
23: /**
24: * Reads cache data from disk.
25: * @param array
26: * @return mixed
27: */
28: protected function readData($meta)
29: {
30: return array(
31: 'file' => $meta[self::FILE],
32: 'handle' => $meta[self::HANDLE],
33: );
34: }
35:
36:
37:
38: /**
39: * Returns file name.
40: * @param string
41: * @return string
42: */
43: protected function getCacheFile($key)
44: {
45: return parent::getCacheFile($key) . '.php';
46: }
47:
48: }
49: