ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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.

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

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

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

94 {
95 return $this->deleteByAdditionalKeys($a_user_id);
96 }
deleteByAdditionalKeys($a_int_key1=null, $a_int_key2=null, $a_text_key1=null, $a_text_key2=null)
Delete by additional keys.

References ilCache\deleteByAdditionalKeys().

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

33 {
34 if(isset(self::$instance) and self::$instance)
35 {
36 return self::$instance;
37 }
38 return self::$instance = new ilCalendarCache();
39 }

References $instance.

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

+ 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

Reimplemented from ilCache.

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

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

References ilCalendarSettings\_getInstance().

+ 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

Reimplemented from ilCache.

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

62 {
63 if(!ilCalendarSettings::_getInstance()->isCacheUsed())
64 {
65 return null;
66 }
67 parent::storeEntry($a_entry_id, $a_value, $a_key1, $a_key2, $a_key3, $a_key4);
68 }

References ilCalendarSettings\_getInstance().

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

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

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

+ Here is the call graph for this function:

Field Documentation

◆ $instance

ilCalendarCache::$instance = null
staticprivate

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

Referenced by getInstance().


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