/** * Constructor * * @param * @return */ function __construct() { parent::__construct("ServicesCache", "Example", false); $this->setExpiresAfter(5); // only five seconds to make a hit // usually you would this value from some setting }
/** * Constructor * * @param * @return */ function __construct() { global $ilSetting; parent::__construct("ServicesObject", "CheckAccess", false); // $this->setExpiresAfter($ilSetting->get("rep_cache") * 60); $this->setExpiresAfter(0); // if ((int) $ilSetting->get("rep_cache") == 0) if (true) { self::$disabled = true; } }
/** * Constructor * * @param * @return */ function __construct() { global $ilSetting; $news_set = new ilSetting("news"); $news_set->get("acc_cache_mins"); parent::__construct("ServicesNews", "News", true); $this->setExpiresAfter($news_set->get("acc_cache_mins") * 60); if ((int) $news_set->get("acc_cache_mins") == 0) { self::$disabled = true; } }
/** * Singleton constructor * @return */ public function __construct() { parent::__construct('ServicesCalendar', 'Calendar', true); $this->setExpiresAfter(60 * ilCalendarSettings::_getInstance()->getCacheMinutes()); }