ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_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)
63 {
64 global $ilSetting;
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?>
Cache class.
setExpiresAfter($a_val)
Set expires after x seconds.
Caches (check) access information on list items.
isDisabled()
Check if cache is disabled.
storeEntry($a_id, $a_value, $a_ref_id=0)
Id is user_id:ref_id, we store ref_if additionally.
deleteByRefId($a_ref_id)
This one can be called, e.g.
global $ilSetting
Definition: privfeed.php:40