}
function set($key,$value,$exptime=0) {
+ if ( wfReadOnly() ) {
+ return false;
+ }
$exptime = intval($exptime);
if($exptime < 0) $exptime = 0;
if($exptime == 0) {
}
function delete($key,$time=0) {
+ if ( wfReadOnly() ) {
+ return false;
+ }
$this->_query(
"DELETE FROM $0 WHERE keyname='$1'", $key );
return true; /* ? */
function expireall() {
/* Remove any items that have expired */
+ if ( wfReadOnly() ) {
+ return false;
+ }
$now = $this->_fromunixtime( time() );
$this->_query( "DELETE FROM $0 WHERE exptime < '$now'" );
}
function deleteall() {
/* Clear *all* items from cache table */
+ if ( wfReadOnly() ) {
+ return false;
+ }
$this->_query( "DELETE FROM $0" );
}