Guest User

Untitled

a guest
Feb 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. <?php
  2.  
  3. if(! class_exists('MemCache', false))
  4. {
  5. class MemCache
  6. {
  7. //Add an item to the server
  8. function add ( $key , $var , $flag = null , $expire =null )
  9. {
  10. return FALSE;
  11. }
  12.  
  13. //Add a memcached server to connection pool
  14. function addServer( $host , $port = 11211 , $persistent = null, $weight = null , $timeout = 1, $retry_interval = 15 , $status = TRUE , $failure_callback = null )
  15. {
  16.  
  17. }
  18.  
  19. // Close memcached server connection
  20. function close()
  21. {
  22. return TRUE;
  23. }
  24.  
  25. //Open memcached server connection
  26. function connect( $host , $port = 11211 , $timeout = 1)
  27. {
  28. return FALSE;
  29. }
  30. //Decrement item's value
  31. function decrement( $key , $value = 1 )
  32. {
  33. return FALSE;
  34. }
  35.  
  36. //Delete item from the server
  37. function delete(string $key ,$timeout = null )
  38. {
  39. return TRUE;
  40. }
  41.  
  42. //Flush all existing items at the server
  43. function flush()
  44. {
  45. return TRUE;
  46. }
  47.  
  48. //Retrieve item from the server
  49. function get( $key , &$flags = null )
  50. {
  51. return FALSE;
  52. }
  53.  
  54. //Get statistics from all servers in pool
  55. function getExtendedStats( $type , $slabid = null , int $limit = null )
  56. {
  57. return FALSE;
  58. }
  59.  
  60. //Returns server status
  61. function getServerStatus( $host , $port = 11211 )
  62. {
  63. return FALSE;
  64. }
  65.  
  66. //Get statistics of the server
  67. function getStats( $type = null , $slabid = null, $limit = null )
  68. {
  69. return FALSE;
  70. }
  71.  
  72. //Return version of the server
  73. function getVersion()
  74. {
  75. return FALSE;
  76. }
  77.  
  78. //Increment item's value
  79. function increment( $key , $value =1 )
  80. {
  81. return FALSE;
  82. }
  83.  
  84. //Open memcached server persistent connection
  85. function pconnect($host , $port = 11211 , $timeout = 1 )
  86. {
  87. return FALSE;
  88. }
  89.  
  90. //Replace value of the existing item
  91. function replace ( $key , $var , $flag = null , $expire = null)
  92. {
  93. return FALSE;
  94. }
  95.  
  96. //Store data at the server
  97. function set($key , $var , $flag = null , $expire = null )
  98. {
  99. return FALSE;
  100. }
  101.  
  102. //Enable automatic compression of large values
  103. function setCompressThreshold( $threshold , $min_savings = 0.2 )
  104. {
  105. return FALSE;
  106. }
  107.  
  108. //Changes server parameters and status at runtime
  109. function setServerParams( $host , $port = 11211 , $timeout = 1 , $retry_interval = 15 , $status = TRUE , $failure_callback = null )
  110. {
  111. return FALSE;
  112. }
  113.  
  114. }
  115.  
  116.  
  117. define("MEMCACHE_COMPRESSED",0);
  118. define("MEMCACHE_HAVE_SESSION",0);
  119.  
  120. // Turn debug output on/off
  121. function memcache_debug( $on_off )
  122. {
  123. return FALSE;
  124. }
  125.  
  126. }
  127. ?>
Add Comment
Please, Sign In to add comment