CacheInterface.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. namespace ZN\Caching;
  3. interface CacheInterface
  4. {
  5. //----------------------------------------------------------------------------------------------------
  6. //
  7. // Yazar : Ozan UYKUN <ozanbote@windowslive.com> | <ozanbote@gmail.com>
  8. // Site : www.zntr.net
  9. // Lisans : The MIT License
  10. // Telif Hakkı: Copyright (c) 2012-2016, zntr.net
  11. //
  12. //----------------------------------------------------------------------------------------------------
  13. //----------------------------------------------------------------------------------------------------
  14. // Select
  15. //----------------------------------------------------------------------------------------------------
  16. //
  17. // @param string $key
  18. // @return mixed
  19. //
  20. //----------------------------------------------------------------------------------------------------
  21. public function select($key);
  22. //----------------------------------------------------------------------------------------------------
  23. // Insert
  24. //----------------------------------------------------------------------------------------------------
  25. //
  26. // @param string $key
  27. // @param variable $var
  28. // @param numeric $time
  29. // @param mixed $expressed
  30. // @return bool
  31. //
  32. //----------------------------------------------------------------------------------------------------
  33. public function insert($key, $var, $time, $expressed);
  34. //----------------------------------------------------------------------------------------------------
  35. // Delete
  36. //----------------------------------------------------------------------------------------------------
  37. //
  38. // @param string $key
  39. // @return mixed
  40. //
  41. //----------------------------------------------------------------------------------------------------
  42. public function delete($key);
  43. //----------------------------------------------------------------------------------------------------
  44. // Increment
  45. //----------------------------------------------------------------------------------------------------
  46. //
  47. // @param string $key
  48. // @param numeric $increment
  49. // @return void
  50. //
  51. //----------------------------------------------------------------------------------------------------
  52. public function increment($key, $increment);
  53. //----------------------------------------------------------------------------------------------------
  54. // Deccrement
  55. //----------------------------------------------------------------------------------------------------
  56. //
  57. // @param string $key
  58. // @param numeric $decrement
  59. // @return void
  60. //
  61. //----------------------------------------------------------------------------------------------------
  62. public function decrement($key, $decrement);
  63. //----------------------------------------------------------------------------------------------------
  64. // Clean
  65. //----------------------------------------------------------------------------------------------------
  66. //
  67. // @param void
  68. // @return void
  69. //
  70. //----------------------------------------------------------------------------------------------------
  71. public function clean();
  72. //----------------------------------------------------------------------------------------------------
  73. // Info
  74. //----------------------------------------------------------------------------------------------------
  75. //
  76. // @param mixed $info
  77. // @return mixed
  78. //
  79. //----------------------------------------------------------------------------------------------------
  80. public function info($info);
  81. //----------------------------------------------------------------------------------------------------
  82. // Get Meta Data
  83. //----------------------------------------------------------------------------------------------------
  84. //
  85. // @param string $key
  86. // @return mixed
  87. //
  88. //----------------------------------------------------------------------------------------------------
  89. public function getMetaData($key);
  90. //----------------------------------------------------------------------------------------------------
  91. // Is Supported
  92. //----------------------------------------------------------------------------------------------------
  93. //
  94. // @param void
  95. // @return bool
  96. //
  97. //----------------------------------------------------------------------------------------------------
  98. public function isSupported();
  99. }