VoidCache.php 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace Doctrine\Common\Cache;
  3. /**
  4. * Void cache driver. The cache could be of use in tests where you don`t need to cache anything.
  5. *
  6. * @deprecated Deprecated without replacement in doctrine/cache 1.11. This class will be dropped in 2.0
  7. *
  8. * @link www.doctrine-project.org
  9. */
  10. class VoidCache extends CacheProvider
  11. {
  12. /**
  13. * {@inheritDoc}
  14. */
  15. protected function doFetch($id)
  16. {
  17. return false;
  18. }
  19. /**
  20. * {@inheritDoc}
  21. */
  22. protected function doContains($id)
  23. {
  24. return false;
  25. }
  26. /**
  27. * {@inheritDoc}
  28. */
  29. protected function doSave($id, $data, $lifeTime = 0)
  30. {
  31. return true;
  32. }
  33. /**
  34. * {@inheritDoc}
  35. */
  36. protected function doDelete($id)
  37. {
  38. return true;
  39. }
  40. /**
  41. * {@inheritDoc}
  42. */
  43. protected function doFlush()
  44. {
  45. return true;
  46. }
  47. /**
  48. * {@inheritDoc}
  49. */
  50. protected function doGetStats()
  51. {
  52. return;
  53. }
  54. }