ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCalendarCache Class Reference

Calendar cache. More...

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

Public Member Functions

 __construct ()
 Singleton constructor. More...
 
 readEntry ($a_entry_id)
 Get cahed entry if cache is active. More...
 
 storeEntry ($a_entry_id, $a_value, $a_key1=0, $a_key2=0, $a_key3='', $a_key4='')
 Store an entry. More...
 
 storeUnlimitedEntry ($a_entry_id, $a_value, $a_key1=0, $a_key2=0, $a_key3='', $a_key4='')
 Store an entry without an expired time. More...
 
 deleteUserEntries ($a_user_id)
 Delete user entries in cache. More...
 
- Public Member Functions inherited from ilCache
 __construct ($a_component, $a_cache_name, $a_use_long_content=false)
 Constructor. More...
 
 isDisabled ()
 Check if cache is disabled Forced if member view is active. More...
 
 setComponent ($a_val)
 Set component. More...
 
 setExpiresAfter ($a_val)
 Set expires after x seconds. More...
 
 getExpiresAfter ()
 Get expires after x seconds. More...
 
 getEntry ($a_id)
 Get entry. More...
 
 getLastAccessStatus ()
 Last access. More...
 
 storeEntry ( $a_id, $a_value, $a_int_key1=null, $a_int_key2=null, $a_text_key1=null, $a_text_key2=null)
 Store entry. More...
 
 deleteByAdditionalKeys ( $a_int_key1=null, $a_int_key2=null, $a_text_key1=null, $a_text_key2=null)
 Delete by additional keys. More...
 
 deleteAllEntries ()
 Delete all entries of cache. More...
 
 deleteEntry ($a_id)
 Delete entry. More...
 

Static Public Member Functions

static getInstance ()
 get singleton instance More...
 

Static Private Attributes

static $instance = null
 

Additional Inherited Members

- Protected Member Functions inherited from ilCache
 getComponent ()
 Get component. More...
 
 setName ($a_val)
 Set name. More...
 
 getName ()
 Get name. More...
 
 setUseLongContent ($a_val)
 Set use long content. More...
 
 getUseLongContent ()
 Get use long content. More...
 
 readEntry ($a_id)
 Read entry. More...
 

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

Constructor & Destructor Documentation

◆ __construct()

ilCalendarCache::__construct ( )

Singleton constructor.

Returns

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

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

23  {
24  parent::__construct('ServicesCalendar', 'Calendar', true);
25  $this->setExpiresAfter(60 * ilCalendarSettings::_getInstance()->getCacheMinutes());
26  }
static _getInstance()
get singleton instance
setExpiresAfter($a_val)
Set expires after x seconds.
+ Here is the call graph for this function:

Member Function Documentation

◆ deleteUserEntries()

ilCalendarCache::deleteUserEntries (   $a_user_id)

Delete user entries in cache.

Parameters
type$a_user_id

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

References ilCache\deleteByAdditionalKeys().

90  {
91  return $this->deleteByAdditionalKeys($a_user_id);
92  }
deleteByAdditionalKeys( $a_int_key1=null, $a_int_key2=null, $a_text_key1=null, $a_text_key2=null)
Delete by additional keys.
+ Here is the call graph for this function:

◆ getInstance()

static ilCalendarCache::getInstance ( )
static

get singleton instance

Returns
object ilCalendarCache

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

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

33  {
34  if (isset(self::$instance) and self::$instance) {
35  return self::$instance;
36  }
37  return self::$instance = new ilCalendarCache();
38  }
+ Here is the caller graph for this function:

◆ readEntry()

ilCalendarCache::readEntry (   $a_entry_id)

Get cahed entry if cache is active.

Parameters
object$a_entry_id
Returns

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

References ilCalendarSettings\_getInstance().

46  {
47  if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
48  return null;
49  }
50  return parent::readEntry($a_entry_id);
51  }
static _getInstance()
get singleton instance
+ Here is the call graph for this function:

◆ storeEntry()

ilCalendarCache::storeEntry (   $a_entry_id,
  $a_value,
  $a_key1 = 0,
  $a_key2 = 0,
  $a_key3 = '',
  $a_key4 = '' 
)

Store an entry.

Parameters
object$a_entry_id
object$a_value
Returns

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

References ilCalendarSettings\_getInstance().

60  {
61  if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
62  return null;
63  }
64  parent::storeEntry($a_entry_id, $a_value, $a_key1, $a_key2, $a_key3, $a_key4);
65  }
static _getInstance()
get singleton instance
+ Here is the call graph for this function:

◆ storeUnlimitedEntry()

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

Store an entry without an expired time.

Parameters
object$a_entry_id
object$a_value
Returns

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

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

74  {
75  if (!ilCalendarSettings::_getInstance()->isCacheUsed()) {
76  return null;
77  }
78  // Unlimited is a year
79  $this->setExpiresAfter(60 * 60 * 24 * 365);
80  parent::storeEntry($a_entry_id, $a_value, $a_key1, $a_key2, $a_key3, $a_key4);
81  $this->setExpiresAfter(ilCalendarSettings::_getInstance()->getCacheMinutes());
82  return true;
83  }
static _getInstance()
get singleton instance
setExpiresAfter($a_val)
Set expires after x seconds.
+ Here is the call graph for this function:

Field Documentation

◆ $instance

ilCalendarCache::$instance = null
staticprivate

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


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