Cache_dummy.php 2.6 KB

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