NullStore.php 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. namespace Illuminate\Cache;
  3. use Illuminate\Contracts\Cache\Store;
  4. class NullStore extends TaggableStore implements Store
  5. {
  6. use RetrievesMultipleKeys;
  7. /**
  8. * The array of stored values.
  9. *
  10. * @var array
  11. */
  12. protected $storage = [];
  13. /**
  14. * Retrieve an item from the cache by key.
  15. *
  16. * @param string $key
  17. * @return mixed
  18. */
  19. public function get($key)
  20. {
  21. //
  22. }
  23. /**
  24. * Store an item in the cache for a given number of minutes.
  25. *
  26. * @param string $key
  27. * @param mixed $value
  28. * @param float|int $minutes
  29. * @return void
  30. */
  31. public function put($key, $value, $minutes)
  32. {
  33. //
  34. }
  35. /**
  36. * Increment the value of an item in the cache.
  37. *
  38. * @param string $key
  39. * @param mixed $value
  40. * @return int
  41. */
  42. public function increment($key, $value = 1)
  43. {
  44. //
  45. }
  46. /**
  47. * Decrement the value of an item in the cache.
  48. *
  49. * @param string $key
  50. * @param mixed $value
  51. * @return int
  52. */
  53. public function decrement($key, $value = 1)
  54. {
  55. //
  56. }
  57. /**
  58. * Store an item in the cache indefinitely.
  59. *
  60. * @param string $key
  61. * @param mixed $value
  62. * @return void
  63. */
  64. public function forever($key, $value)
  65. {
  66. //
  67. }
  68. /**
  69. * Remove an item from the cache.
  70. *
  71. * @param string $key
  72. * @return void
  73. */
  74. public function forget($key)
  75. {
  76. //
  77. }
  78. /**
  79. * Remove all items from the cache.
  80. *
  81. * @return bool
  82. */
  83. public function flush()
  84. {
  85. return true;
  86. }
  87. /**
  88. * Get the cache key prefix.
  89. *
  90. * @return string
  91. */
  92. public function getPrefix()
  93. {
  94. return '';
  95. }
  96. }