ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilListItemAccessCache.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Cache/classes/class.ilCache.php");
5 
14 {
15  static $disabled = false;
16 
23  function __construct()
24  {
25  global $ilSetting;
26  parent::__construct("ServicesObject", "CheckAccess", false);
27 // $this->setExpiresAfter($ilSetting->get("rep_cache") * 60);
28  $this->setExpiresAfter(0);
29 // if ((int) $ilSetting->get("rep_cache") == 0)
30  if (true)
31  {
32  self::$disabled = true;
33  }
34  }
35 
40  public function isDisabled()
41  {
42  return self::$disabled or parent::isDisabled();
43  }
44 
45 
49  function readEntry($a_id)
50  {
51  if (!$this->isDisabled())
52  {
53  return parent::readEntry($a_id);
54  }
55  return false;
56  }
57 
58 
62  function storeEntry($a_id, $a_value, $a_ref_id = 0, $a_int_key2 = null,
63  $a_text_key1 = null, $a_text_key2 = null)
64  {
65  if (!$this->isDisabled())
66  {
67  parent::storeEntry($a_id, $a_value, $a_ref_id);
68  }
69  }
70 
74  function deleteByRefId($a_ref_id)
75  {
76  parent::deleteByAdditionalKeys($a_ref_id);
77  }
78 }
79 ?>
deleteByRefId($a_ref_id)
This one can be called, e.g.
Cache class.
Caches (check) access information on list items.
global $ilSetting
Definition: privfeed.php:17
storeEntry($a_id, $a_value, $a_ref_id=0, $a_int_key2=null, $a_text_key1=null, $a_text_key2=null)
Id is user_id:ref_id, we store ref_if additionally.
setExpiresAfter($a_val)
Set expires after x seconds.
isDisabled()
Check if cache is disabled.