Development

/branches/1.3/lib/cache/sfNoCache.class.php

You must first sign up to be able to contribute.

root/branches/1.3/lib/cache/sfNoCache.class.php

Revision 10970, 1.2 kB (checked in by fabien, 6 years ago)

[1.1, 1.2] fixed default value returned by sfNoCache::get() method

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * Cache class that does nothing.
13  *
14  * @package    symfony
15  * @subpackage cache
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 class sfNoCache extends sfCache
20 {
21   /**
22    * @see sfCache
23    */
24   public function get($key, $default = null)
25   {
26     return $default;
27   }
28
29   /**
30    * @see sfCache
31    */
32   public function has($key)
33   {
34     return false;
35   }
36
37   /**
38    * @see sfCache
39    */
40   public function set($key, $data, $lifetime = null)
41   {
42     return true;
43   }
44
45   /**
46    * @see sfCache
47    */
48   public function remove($key)
49   {
50     return true;
51   }
52
53   /**
54    * @see sfCache
55    */
56   public function removePattern($pattern)
57   {
58     return true;
59   }
60
61   /**
62    * @see sfCache
63    */
64   public function clean($mode = self::ALL)
65   {
66     return true;
67   }
68
69   /**
70    * @see sfCache
71    */
72   public function getLastModified($key)
73   {
74     return 0;
75   }
76
77   /**
78    * @see sfCache
79    */
80   public function getTimeout($key)
81   {
82     return 0;
83   }
84 }
85
Note: See TracBrowser for help on using the browser.