ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 26 of file class.ilCalendarCache.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarCache::__construct ( )

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

31 {
32 parent::__construct('ServicesCalendar', 'Calendar', true);
33 $this->setExpiresAfter(60 * ilCalendarSettings::_getInstance()->getCacheMinutes());
34 }
setExpiresAfter(int $a_val)
Set expires after x seconds.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ 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 92 of file class.ilCalendarCache.php.

92 : void
93 {
94 $this->deleteByAdditionalKeys($a_user_id);
95 }
deleteByAdditionalKeys(?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)

◆ getInstance()

static ilCalendarCache::getInstance ( )
static

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

36 : self
37 {
38 if (!self::$instance instanceof self) {
39 self::$instance = new self();
40 }
41 return self::$instance;
42 }
static ilCalendarCache $instance

References $instance.

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

+ Here is the caller graph for this function:

◆ readEntry()

ilCalendarCache::readEntry ( string  $a_id)
protected

Get cached entry if cache is active.

Reimplemented from ilCache.

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

47 : bool
48 {
49 if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
50 return false;
51 }
52 return parent::readEntry($a_id);
53 }

References ilCalendarSettings\_getInstance().

+ 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 
)

Reimplemented from ilCache.

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

62 : void {
63 if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
64 return;
65 }
66 parent::storeEntry($a_id, $a_value, $a_int_key1, $a_int_key2, $a_text_key1, $a_text_key2);
67 }

◆ 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 72 of file class.ilCalendarCache.php.

79 : void {
80 if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
81 return;
82 }
83 // Unlimited is a year
84 $this->setExpiresAfter(60 * 60 * 24 * 365);
85 parent::storeEntry($a_entry_id, $a_value, $a_key1, $a_key2, $a_key3, $a_key4);
86 $this->setExpiresAfter(ilCalendarSettings::_getInstance()->getCacheMinutes());
87 }

Field Documentation

◆ $instance

ilCalendarCache ilCalendarCache::$instance = null
staticprivate

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

Referenced by getInstance().


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