Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
ADODB_Cache_MemCache Class Reference

Public Member Functions

 __construct ($db)
 Class Constructor.
 
 connect (&$err)
 Lazy connection.
 
 flushAll ($debug=false)
 Flushes all of the stored memcache data.
 
 flushCache ($filename, $debug=false)
 Flushes the contents of a specified query.
 
 isLibMemcached ()
 Return true if the current library is Memcached.
 
 readCache ($filename, &$err, $secs2cache, $rsClass)
 Reads a cached query from the server.
 
 writeCache ($filename, $contents, $debug, $secs2cache)
 Writes a cached query to the server.
 

Public Attributes

bool $createdir = false
 Prevents parent class calling non-existant function.
 
const MCLIB = 1
 An integer index into the libraries.
 
const MCLIBD = 2
 

Constructor & Destructor Documentation

◆ __construct()

ADODB_Cache_MemCache::__construct ( $db)

Class Constructor.

Parameters
ADOConnection$db

Member Function Documentation

◆ connect()

ADODB_Cache_MemCache::connect ( & $err)

Lazy connection.

The connection only occurs on CacheExecute call.

Parameters
string$err
Return values
boolsuccess of connecting to a server

◆ flushAll()

ADODB_Cache_MemCache::flushAll ( $debug = false)

Flushes all of the stored memcache data.

Parameters
bool$debug
Return values
boolThe response from the memcache server

◆ flushCache()

ADODB_Cache_MemCache::flushCache ( $filename,
$debug = false )

Flushes the contents of a specified query.

Parameters
string$filenameThe MD5 of the query to flush
bool$debug
Return values
boolThe response from the memcache server

◆ isLibMemcached()

ADODB_Cache_MemCache::isLibMemcached ( )

Return true if the current library is Memcached.

Return values
bool

◆ readCache()

ADODB_Cache_MemCache::readCache ( $filename,
& $err,
$secs2cache,
$rsClass )

Reads a cached query from the server.

Parameters
string$filenameThe MD5 of the query to read
string$errThe query results
int$secs2cache
object$rsClassUNUSED
Return values
object|boolrecord or false.

@noinspection PhpUnusedParameterInspection

◆ writeCache()

ADODB_Cache_MemCache::writeCache ( $filename,
$contents,
$debug,
$secs2cache )

Writes a cached query to the server.

Parameters
string$filenameThe MD5 of the query to cache
string$contentsThe query results
bool$debug
int$secs2cache
Return values
booltrue or false. true if successful save

Member Data Documentation

◆ MCLIB

const ADODB_Cache_MemCache::MCLIB = 1

An integer index into the libraries.

See also
$libraries

The documentation for this class was generated from the following file: