ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 {
18  protected $settings;
19 
20  public static $disabled = false;
21 
28  public function __construct()
29  {
30  global $DIC;
31 
32  $this->settings = $DIC->settings();
33  $ilSetting = $DIC->settings();
34  parent::__construct("ServicesObject", "CheckAccess", false);
35  // $this->setExpiresAfter($ilSetting->get("rep_cache") * 60);
36  $this->setExpiresAfter(0);
37  // if ((int) $ilSetting->get("rep_cache") == 0)
38  if (true) {
39  self::$disabled = true;
40  }
41  }
42 
47  public function isDisabled()
48  {
49  return self::$disabled or parent::isDisabled();
50  }
51 
52 
56  public function readEntry($a_id)
57  {
58  if (!$this->isDisabled()) {
59  return parent::readEntry($a_id);
60  }
61  return false;
62  }
63 
64 
68  public function storeEntry(
69  $a_id,
70  $a_value,
71  $a_ref_id = 0,
72  $a_int_key2 = null,
73  $a_text_key1 = null,
74  $a_text_key2 = null
75  ) {
76  if (!$this->isDisabled()) {
77  parent::storeEntry($a_id, $a_value, $a_ref_id);
78  }
79  }
80 
84  public function deleteByRefId($a_ref_id)
85  {
86  parent::deleteByAdditionalKeys($a_ref_id);
87  }
88 }
global $DIC
Definition: saml.php:7
deleteByRefId($a_ref_id)
This one can be called, e.g.
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.
Cache class.
Caches (check) access information on list items.
settings()
Definition: settings.php:2
global $ilSetting
Definition: privfeed.php:17
setExpiresAfter($a_val)
Set expires after x seconds.
isDisabled()
Check if cache is disabled.