Source for file DummyStorage.php

Documentation is available at DummyStorage.php

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework
  5. 5:  *
  6. 6:  * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
  7. 7:  *
  8. 8:  * This source file is subject to the "Nette license" that is bundled
  9. 9:  * with this package in the file license.txt.
  10. 10:  *
  11. 11:  * For more information please see https://nette.org
  12. 12:  *
  13. 13:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  14. 14:  * @license    https://nette.org/license  Nette license
  15. 15:  * @link       https://nette.org
  16. 16:  * @category   Nette
  17. 17:  * @package    Nette\Caching
  18. 18:  * @version    $Id$
  19. 19:  */
  20. 20:  
  21. 21:  
  22. 22:  
  23. 23: require_once dirname(__FILE__'/../Object.php';
  24. 24:  
  25. 25: require_once dirname(__FILE__'/../Caching/ICacheStorage.php';
  26. 26:  
  27. 27:  
  28. 28:  
  29. 29: /**
  30. 30:  * Cache dummy storage.
  31. 31:  *
  32. 32:  * @author     David Grudl
  33. 33:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  34. 34:  * @package    Nette\Caching
  35. 35:  */
  36. 36: class DummyStorage extends Object implements ICacheStorage
  37. 37: {
  38. 38:  
  39. 39:     /**
  40. 40:      * Read from cache.
  41. 41:      * @param  string key
  42. 42:      * @return mixed|NULL
  43. 43:      */
  44. 44:     public function read($key)
  45. 45:     {
  46. 46:         return NULL;
  47. 47:     }
  48. 48:  
  49. 49:  
  50. 50:  
  51. 51:     /**
  52. 52:      * Writes item into the cache.
  53. 53:      * @param  string key
  54. 54:      * @param  mixed  data
  55. 55:      * @param  array  dependencies
  56. 56:      * @return bool  TRUE if no problem
  57. 57:      */
  58. 58:     public function write($key$dataarray $dp)
  59. 59:     {
  60. 60:         return TRUE;
  61. 61:     }
  62. 62:  
  63. 63:  
  64. 64:  
  65. 65:     /**
  66. 51: /**
  67. 52:      * Removes item from the cache.
  68. 53:      * @param  string key
  69. 54:      * @return bool  TRUE if no problem
  70. 69:      */
  71. 70:     public function remove($key)
  72. 71:     {
  73. 72:         return TRUE;
  74. 73:     }
  75. 74:  
  76. 75:  
  77. 76:  
  78. 77:     /**
  79. 78:      * Removes items from the cache by conditions & garbage collector.
  80. 79:      * @param  array  conditions
  81. 80:      * @return bool  TRUE if no problem
  82. 81:      */
  83. 82:     public function clean(array $conds)
  84. 83:     {
  85. 84:         return TRUE;
  86. 85:     }
  87. 86:  
  88. 87: }