40         bool $a_use_long_content = 
false    58         $this->component = $a_val;
    66     protected function setName(
string $a_val): void
    78         $this->use_long_content = $a_val;
    91         $this->expires_after = $a_val;
    99     final public function getEntry(
string $a_id): ?string
   102             $this->last_access = 
"hit";
   105         $this->last_access = 
"miss";
   117         $query = 
"SELECT value FROM $table WHERE " .
   118             "component = " . $ilDB->quote($this->
getComponent(), 
"text") . 
" AND " .
   119             "name = " . $ilDB->quote($this->
getName(), 
"text") . 
" AND " .
   120             "expire_time > " . $ilDB->quote(time(), 
"integer") . 
" AND " .
   122             "entry_id = " . $ilDB->quote($a_id, 
"text");
   124         $set = $ilDB->query($query);
   126         if ($rec = $ilDB->fetchAssoc($set)) {
   127             $this->entry = $rec[
"value"];
   142         ?
int $a_int_key1 = null,
   143         ?
int $a_int_key2 = null,
   144         ?
string $a_text_key1 = null,
   145         ?
string $a_text_key2 = null
   157         if (strlen($a_value) > 4000 && $type == 
"text") {
   161         $set = $ilDB->replace($table, array(
   163             "name" => array(
"text", $this->
getName()),
   164             "entry_id" => array(
"text", $a_id)
   166             "value" => array($type, $a_value),
   167             "int_key_1" => array(
"integer", $a_int_key1),
   168             "int_key_2" => array(
"integer", $a_int_key2),
   169             "text_key_1" => array(
"text", $a_text_key1),
   170             "text_key_2" => array(
"text", $a_text_key2),
   171             "expire_time" => array(
"integer", (time() + $this->
getExpiresAfter())),
   176         $random = new \ilRandom();
   177         $num = $random->int(1, 2000);
   180                 "DELETE FROM $table WHERE " .
   182                 " OR expire_time < " . $ilDB->quote(time(), 
"integer")
   188         ?
int $a_int_key1 = null,
   189         ?
int $a_int_key2 = null,
   190         ?
string $a_text_key1 = null,
   191         ?
string $a_text_key2 = null
   199         $q = 
"DELETE FROM $table WHERE " .
   200             "component = " . $ilDB->quote($this->
getComponent(), 
"text") .
   201             " AND name = " . $ilDB->quote($this->
getName(), 
"text");
   203         $fds = array(
"int_key_1" => array(
"v" => $a_int_key1, 
"t" => 
"integer"),
   204             "int_key_2" => array(
"v" => $a_int_key2, 
"t" => 
"integer"),
   205             "text_key_1" => array(
"v" => $a_text_key1, 
"t" => 
"text"),
   206             "text_key_2" => array(
"v" => $a_text_key2, 
"t" => 
"text"));
   208         foreach ($fds as $k => $fd) {
   209             if (!is_null($fd[
"v"])) {
   210                 $q .= $sep . 
" " . $k . 
" = " . $ilDB->quote($fd[
"v"], $fd[
"t"]);
   214         $ilDB->manipulate(
$q);
   225         $q = 
"DELETE FROM $table WHERE " .
   226             "component = " . $ilDB->quote($this->
getComponent(), 
"text") .
   227             " AND name = " . $ilDB->quote($this->
getName(), 
"text");
   228         $ilDB->manipulate(
$q);
   239         $ilDB->manipulate(
"DELETE FROM " . $table . 
" WHERE "   240             . 
" entry_id = " . $ilDB->quote($a_id, 
"text")
   241             . 
" AND component = " . $ilDB->quote($this->
getComponent(), 
"text") .
   242             " AND name = " . $ilDB->quote($this->
getName(), 
"text"));
 deleteByAdditionalKeys(?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
 
setUseLongContent(bool $a_val)
 
const ILIAS_VERSION_NUMERIC
 
isDisabled()
Check if cache is disabled Forced if member view is active. 
 
setExpiresAfter(int $a_val)
Set expires after x seconds. 
 
deleteEntry(string $a_id)
 
setComponent(string $a_val)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
storeEntry(string $a_id, string $a_value, ?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
 
__construct(string $a_component, string $a_cache_name, bool $a_use_long_content=false)