コード例 #1
0
 /**
  * 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
 }
コード例 #2
0
 /**
  * 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;
     }
 }
コード例 #3
0
 /**
  * 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;
     }
 }
コード例 #4
0
 /**
  * Singleton constructor
  * @return 
  */
 public function __construct()
 {
     parent::__construct('ServicesCalendar', 'Calendar', true);
     $this->setExpiresAfter(60 * ilCalendarSettings::_getInstance()->getCacheMinutes());
 }