示例#1
0
 /**
  * Remove cache records older than ttl
  */
 function expunge()
 {
     if ($this->type == 'db' && $this->db) {
         $this->db->query("DELETE FROM " . $this->db->table_name('cache') . " WHERE user_id = ?" . " AND cache_key LIKE ?" . " AND " . $this->db->unixtimestamp('created') . " < ?", $this->userid, $this->prefix . '.%', time() - $this->ttl);
     }
 }