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 http://nettephp.com
  12. 12:  *
  13. 13:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  14. 14:  * @license    http://nettephp.com/license  Nette license
  15. 15:  * @link       http://nettephp.com
  16. 16:  * @category   Nette
  17. 17:  * @package    Nette\Caching
  18. 18:  */
  19. 19:  
  20. 20:  
  21. 21:  
  22. 22: require_once dirname(__FILE__'/../Object.php';
  23. 23:  
  24. 24: require_once dirname(__FILE__'/../Caching/ICacheStorage.php';
  25. 25:  
  26. 26:  
  27. 27:  
  28. 28: /**
  29. 29:  * Cache dummy storage.
  30. 30:  *
  31. 31:  * @author     David Grudl
  32. 32:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  33. 33:  * @package    Nette\Caching
  34. 34:  */
  35. 35: class DummyStorage extends Object implements ICacheStorage
  36. 36: {
  37. 37:  
  38. 38:     /**
  39. 39:      * Read from cache.
  40. 40:      * @param  string key
  41. 41:      * @return mixed|NULL
  42. 42:      */
  43. 43:     public function read($key)
  44. 44:     {
  45. 45:         return NULL;
  46. 46:     }
  47. 47:  
  48. 48:  
  49. 49:  
  50. 50:     /**
  51. 51:      * Writes item into the cache.
  52. 52:      * @param  string key
  53. 53:      * @param  mixed  data
  54. 54:      * @param  array  dependencies
  55. 55:      * @return bool  TRUE if no problem
  56. 56:      */
  57. 57:     public function write($key$dataarray $dp)
  58. 58:     {
  59. 59:         return TRUE;
  60. 60:     }
  61. 61:  
  62. 62:  
  63. 63:  
  64. 64:     /**
  65. 50: /**
  66. 51:      * Removes item from the cache.
  67. 52:      * @param  string key
  68. 53:      * @return bool  TRUE if no problem
  69. 68:      */
  70. 69:     public function remove($key)
  71. 70:     {
  72. 71:         return TRUE;
  73. 72:     }
  74. 73:  
  75. 74:  
  76. 75:  
  77. 76:     /**
  78. 77:      * Removes items from the cache by conditions & garbage collector.
  79. 78:      * @param  array  conditions
  80. 79:      * @return bool  TRUE if no problem
  81. 80:      */
  82. 81:     public function clean(array $conds)
  83. 82:     {
  84. 83:         return TRUE;
  85. 84:     }
  86. 85:  
  87. 86: }