Skip to content

Instantly share code, notes, and snippets.

@adaptive
Created August 25, 2008 12:41
Show Gist options
  • Save adaptive/7069 to your computer and use it in GitHub Desktop.
Save adaptive/7069 to your computer and use it in GitHub Desktop.
<?php
if(! class_exists('MemCache', false))
{
class MemCache
{
//Add an item to the server
function add ( $key , $var , $flag = null , $expire =null )
{
return FALSE;
}
//Add a memcached server to connection pool
function addServer( $host , $port = 11211 , $persistent = null, $weight = null , $timeout = 1, $retry_interval = 15 , $status = TRUE , $failure_callback = null )
{
}
// Close memcached server connection
function close()
{
return TRUE;
}
//Open memcached server connection
function connect( $host , $port = 11211 , $timeout = 1)
{
return FALSE;
}
//Decrement item's value
function decrement( $key , $value = 1 )
{
return FALSE;
}
//Delete item from the server
function delete(string $key ,$timeout = null )
{
return TRUE;
}
//Flush all existing items at the server
function flush()
{
return TRUE;
}
//Retrieve item from the server
function get( $key , &$flags = null )
{
return FALSE;
}
//Get statistics from all servers in pool
function getExtendedStats( $type , $slabid = null , int $limit = null )
{
return FALSE;
}
//Returns server status
function getServerStatus( $host , $port = 11211 )
{
return FALSE;
}
//Get statistics of the server
function getStats( $type = null , $slabid = null, $limit = null )
{
return FALSE;
}
//Return version of the server
function getVersion()
{
return FALSE;
}
//Increment item's value
function increment( $key , $value =1 )
{
return FALSE;
}
//Open memcached server persistent connection
function pconnect($host , $port = 11211 , $timeout = 1 )
{
return FALSE;
}
//Replace value of the existing item
function replace ( $key , $var , $flag = null , $expire = null)
{
return FALSE;
}
//Store data at the server
function set($key , $var , $flag = null , $expire = null )
{
return FALSE;
}
//Enable automatic compression of large values
function setCompressThreshold( $threshold , $min_savings = 0.2 )
{
return FALSE;
}
//Changes server parameters and status at runtime
function setServerParams( $host , $port = 11211 , $timeout = 1 , $retry_interval = 15 , $status = TRUE , $failure_callback = null )
{
return FALSE;
}
}
define("MEMCACHE_COMPRESSED",0);
define("MEMCACHE_HAVE_SESSION",0);
// Turn debug output on/off
function memcache_debug( $on_off )
{
return FALSE;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment