ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCalendarCache Class Reference

Calendar cache. More...

+ Inheritance diagram for ilCalendarCache:
+ Collaboration diagram for ilCalendarCache:

Public Member Functions

 __construct ()
 
 storeEntry (string $a_id, string $a_value, ?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
 
 storeUnlimitedEntry (string $a_entry_id, string $a_value, ?int $a_key1=0, ?int $a_key2=0, ?string $a_key3='', ?string $a_key4='')
 Store an entry without an expired time (one year) More...
 
 deleteUserEntries (int $a_user_id)
 Delete user entries in cache. More...
 
- Public Member Functions inherited from ilCache
 __construct (string $a_component, string $a_cache_name, bool $a_use_long_content=false)
 
 isDisabled ()
 Check if cache is disabled Forced if member view is active. More...
 
 setComponent (string $a_val)
 
 setExpiresAfter (int $a_val)
 Set expires after x seconds. More...
 
 getExpiresAfter ()
 
 getEntry (string $a_id)
 
 getLastAccessStatus ()
 
 storeEntry (string $a_id, string $a_value, ?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
 
 deleteByAdditionalKeys (?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
 
 deleteAllEntries ()
 
 deleteEntry (string $a_id)
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 readEntry (string $a_id)
 Get cached entry if cache is active. More...
 
- Protected Member Functions inherited from ilCache
 getComponent ()
 
 setName (string $a_val)
 
 getName ()
 
 setUseLongContent (bool $a_val)
 
 getUseLongContent ()
 
 readEntry (string $a_id)
 

Static Private Attributes

static ilCalendarCache $instance = null
 

Additional Inherited Members

- Protected Attributes inherited from ilCache
string $entry
 
string $last_access
 
int $expires_after
 
bool $use_long_content
 
string $name
 
string $component
 

Detailed Description

Calendar cache.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilCalendarCache.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarCache::__construct ( )

Definition at line 16 of file class.ilCalendarCache.php.

References ILIAS\GlobalScreen\Provider\__construct(), ilCalendarSettings\_getInstance(), and ilCache\setExpiresAfter().

17  {
18  parent::__construct('ServicesCalendar', 'Calendar', true);
19  $this->setExpiresAfter(60 * ilCalendarSettings::_getInstance()->getCacheMinutes());
20  }
setExpiresAfter(int $a_val)
Set expires after x seconds.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ deleteUserEntries()

ilCalendarCache::deleteUserEntries ( int  $a_user_id)

Delete user entries in cache.

Definition at line 78 of file class.ilCalendarCache.php.

References ilCache\deleteByAdditionalKeys().

78  : void
79  {
80  $this->deleteByAdditionalKeys($a_user_id);
81  }
deleteByAdditionalKeys(?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
+ Here is the call graph for this function:

◆ getInstance()

static ilCalendarCache::getInstance ( )
static

Definition at line 22 of file class.ilCalendarCache.php.

Referenced by ilCalendarAppointmentGUI\createDefaultCalendar(), ilCalendarCategories\deletePDItemsCache(), ilCalendarCategories\deleteRepositoryCache(), and ilCalendarCategories\initialize().

22  : self
23  {
24  if (!self::$instance instanceof self) {
25  self::$instance = new self();
26  }
27  return self::$instance;
28  }
+ Here is the caller graph for this function:

◆ readEntry()

ilCalendarCache::readEntry ( string  $a_id)
protected

Get cached entry if cache is active.

Definition at line 33 of file class.ilCalendarCache.php.

References ilCalendarSettings\_getInstance().

33  : bool
34  {
35  if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
36  return false;
37  }
38  return parent::readEntry($a_id);
39  }
+ Here is the call graph for this function:

◆ storeEntry()

ilCalendarCache::storeEntry ( string  $a_id,
string  $a_value,
?int  $a_int_key1 = null,
?int  $a_int_key2 = null,
?string  $a_text_key1 = null,
?string  $a_text_key2 = null 
)

Definition at line 41 of file class.ilCalendarCache.php.

References ilCalendarSettings\_getInstance().

48  : void {
49  if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
50  return;
51  }
52  parent::storeEntry($a_id, $a_value, $a_int_key1, $a_int_key2, $a_text_key1, $a_text_key2);
53  }
+ Here is the call graph for this function:

◆ storeUnlimitedEntry()

ilCalendarCache::storeUnlimitedEntry ( string  $a_entry_id,
string  $a_value,
?int  $a_key1 = 0,
?int  $a_key2 = 0,
?string  $a_key3 = '',
?string  $a_key4 = '' 
)

Store an entry without an expired time (one year)

Definition at line 58 of file class.ilCalendarCache.php.

References ilCalendarSettings\_getInstance(), and ilCache\setExpiresAfter().

65  : void {
66  if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
67  return;
68  }
69  // Unlimited is a year
70  $this->setExpiresAfter(60 * 60 * 24 * 365);
71  parent::storeEntry($a_entry_id, $a_value, $a_key1, $a_key2, $a_key3, $a_key4);
72  $this->setExpiresAfter(ilCalendarSettings::_getInstance()->getCacheMinutes());
73  }
setExpiresAfter(int $a_val)
Set expires after x seconds.
+ Here is the call graph for this function:

Field Documentation

◆ $instance

ilCalendarCache ilCalendarCache::$instance = null
staticprivate

Definition at line 14 of file class.ilCalendarCache.php.


The documentation for this class was generated from the following file: