1. sfNoCache.class.php
  2. /** * Cache class that does nothing. * * @package symfony * @subpackage cache * @author Fabien Potencier * @version SVN: $Id: sfNoCache.class.php 10970 2008-08-19 19:02:38Z fabien $ */
  3. class sfNoCache extends sfCache
  4. {
  5. /**
  6. * @see sfCache
  7. */
  8. public function get($key, $default = null)
  9. {
  10. return $default;
  11. }
  12. /**
  13. * @see sfCache
  14. */
  15. public function has($key)
  16. {
  17. return false;
  18. }
  19. /**
  20. * @see sfCache
  21. */
  22. public function set($key, $data, $lifetime = null)
  23. {
  24. return true;
  25. }
  26. /**
  27. * @see sfCache
  28. */
  29. public function remove($key)
  30. {
  31. return true;
  32. }
  33. /**
  34. * @see sfCache
  35. */
  36. public function removePattern($pattern)
  37. {
  38. return true;
  39. }
  40. /**
  41. * @see sfCache
  42. */
  43. public function clean($mode = self::ALL)
  44. {
  45. return true;
  46. }
  47. /**
  48. * @see sfCache
  49. */
  50. public function getLastModified($key)
  51. {
  52. return 0;
  53. }
  54. /**
  55. * @see sfCache
  56. */
  57. public function getTimeout($key)
  58. {
  59. return 0;
  60. }
  61. }

Debug toolbar