ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCalendarCache Class Reference

Calendar cache. More...

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

Public Member Functions

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

Static Public Member Functions

static getInstance ()
 get singleton instance

Static Private Attributes

static $instance = null

Additional Inherited Members

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

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

ilCalendarCache::__construct ( )

Singleton constructor.

Returns

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

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

{
parent::__construct('ServicesCalendar','Calendar',true);
$this->setExpiresAfter(60 * ilCalendarSettings::_getInstance()->getCacheMinutes());
}

+ Here is the call graph for this function:

Member Function Documentation

static ilCalendarCache::getInstance ( )
static

get singleton instance

Returns
object ilCalendarCache

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

References $instance.

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

{
if(isset(self::$instance) and self::$instance)
{
}
return self::$instance = new ilCalendarCache();
}

+ Here is the caller graph for this function:

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.

References ilCalendarSettings\_getInstance().

{
if(!ilCalendarSettings::_getInstance()->isCacheUsed())
{
return null;
}
return parent::readEntry($a_entry_id);
}

+ Here is the call graph for this function:

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.

References ilCalendarSettings\_getInstance().

Referenced by storeUnlimitedEntry().

{
if(!ilCalendarSettings::_getInstance()->isCacheUsed())
{
return null;
}
parent::storeEntry($a_entry_id, $a_value, $a_key1, $a_key2, $a_key3, $a_key4);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

{
if(!ilCalendarSettings::_getInstance()->isCacheUsed())
{
return null;
}
// Unlimited is a year
$this->setExpiresAfter(60 * 60 * 24 * 365);
parent::storeEntry($a_entry_id,$a_value, $a_key1, $a_key2, $a_key3, $a_key4);
$this->setExpiresAfter(ilCalendarSettings::_getInstance()->getCacheMinutes());
return true;
}

+ Here is the call graph for this function:

Field Documentation

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: