ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilNewsCache Class Reference

News cache. More...

+ Inheritance diagram for ilNewsCache:
+ Collaboration diagram for ilNewsCache:

Public Member Functions

 __construct ()
 Constructor.
 isDisabled ()
 Check if cache is disabled.
 readEntry ($a_id)
 Read an entry.
 storeEntry ($a_id, $a_value)
 Id is user_id:ref_id, we store ref_if additionally.
- Public Member Functions inherited from ilCache
 __construct ($a_component, $a_cache_name, $a_use_long_content=false)
 Constructor.
 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.
 storeEntry ($a_id, $a_value, $a_int_key1=null, $a_int_key2=null, $a_text_key1=null, $a_text_key2=null)
 Store entry.
 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 Attributes

static $disabled = false

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

News cache.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 13 of file class.ilNewsCache.php.

Constructor & Destructor Documentation

ilNewsCache::__construct ( )

Constructor.

Parameters
@return

Definition at line 23 of file class.ilNewsCache.php.

References $ilSetting, and ilCache\setExpiresAfter().

{
global $ilSetting;
$news_set = new ilSetting("news");
$news_set->get("acc_cache_mins");
parent::__construct("ServicesNews", "News", true);
$this->setExpiresAfter($news_set->get("acc_cache_mins") * 60);
if ((int) $news_set->get("acc_cache_mins") == 0)
{
self::$disabled = true;
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilNewsCache::isDisabled ( )

Check if cache is disabled.

Returns

Reimplemented from ilCache.

Definition at line 42 of file class.ilNewsCache.php.

Referenced by readEntry(), and storeEntry().

{
return self::$disabled or parent::isDisabled();
}

+ Here is the caller graph for this function:

ilNewsCache::readEntry (   $a_id)

Read an entry.

Reimplemented from ilCache.

Definition at line 51 of file class.ilNewsCache.php.

References isDisabled().

{
if (!$this->isDisabled())
{
return parent::readEntry($a_id);
}
return false;
}

+ Here is the call graph for this function:

ilNewsCache::storeEntry (   $a_id,
  $a_value 
)

Id is user_id:ref_id, we store ref_if additionally.

Definition at line 64 of file class.ilNewsCache.php.

References $ilSetting, and isDisabled().

{
global $ilSetting;
if(!$this->isDisabled())
{
parent::storeEntry($a_id, $a_value);
}
}

+ Here is the call graph for this function:

Field Documentation

ilNewsCache::$disabled = false
static

Definition at line 15 of file class.ilNewsCache.php.


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