Cache_dummy.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. /**
  3. * CodeIgniter
  4. *
  5. * An open source application development framework for PHP 5.1.6 or newer
  6. *
  7. * @package CodeIgniter
  8. * @author EllisLab Dev Team
  9. * @copyright Copyright (c) 2006 - 2014 EllisLab, Inc.
  10. * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  11. * @license http://codeigniter.com/user_guide/license.html
  12. * @link http://codeigniter.com
  13. * @since Version 2.0
  14. * @filesource
  15. */
  16. // ------------------------------------------------------------------------
  17. /**
  18. * CodeIgniter Dummy Caching Class
  19. *
  20. * @package CodeIgniter
  21. * @subpackage Libraries
  22. * @category Core
  23. * @author EllisLab Dev Team
  24. * @link
  25. */
  26. class CI_Cache_dummy extends CI_Driver {
  27. /**
  28. * Get
  29. *
  30. * Since this is the dummy class, it's always going to return FALSE.
  31. *
  32. * @param string
  33. * @return Boolean FALSE
  34. */
  35. public function get($id)
  36. {
  37. return FALSE;
  38. }
  39. // ------------------------------------------------------------------------
  40. /**
  41. * Cache Save
  42. *
  43. * @param string Unique Key
  44. * @param mixed Data to store
  45. * @param int Length of time (in seconds) to cache the data
  46. *
  47. * @return boolean TRUE, Simulating success
  48. */
  49. public function save($id, $data, $ttl = 60)
  50. {
  51. return TRUE;
  52. }
  53. // ------------------------------------------------------------------------
  54. /**
  55. * Delete from Cache
  56. *
  57. * @param mixed unique identifier of the item in the cache
  58. * @param boolean TRUE, simulating success
  59. */
  60. public function delete($id)
  61. {
  62. return TRUE;
  63. }
  64. // ------------------------------------------------------------------------
  65. /**
  66. * Clean the cache
  67. *
  68. * @return boolean TRUE, simulating success
  69. */
  70. public function clean()
  71. {
  72. return TRUE;
  73. }
  74. // ------------------------------------------------------------------------
  75. /**
  76. * Cache Info
  77. *
  78. * @param string user/filehits
  79. * @return boolean FALSE
  80. */
  81. public function cache_info($type = NULL)
  82. {
  83. return FALSE;
  84. }
  85. // ------------------------------------------------------------------------
  86. /**
  87. * Get Cache Metadata
  88. *
  89. * @param mixed key to get cache metadata on
  90. * @return boolean FALSE
  91. */
  92. public function get_metadata($id)
  93. {
  94. return FALSE;
  95. }
  96. // ------------------------------------------------------------------------
  97. /**
  98. * Is this caching driver supported on the system?
  99. * Of course this one is.
  100. *
  101. * @return TRUE;
  102. */
  103. public function is_supported()
  104. {
  105. return TRUE;
  106. }
  107. }
  108. /* End of file Cache_dummy.php */
  109. /* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */