LoggedInSwitchCacheManager Class Reference
[Usermanagement]
Cache manager that caches two versions: One for logged in users and one for guests. More...
Inheritance diagram for
LoggedInSwitchCacheManager:
Public Member Functions |
|
get_cache_header_manager () | |
Get cache header manager. |
|
get_cache_id () | |
Return a chache id. |
Detailed Description
Cache manager that caches two versions: One for logged in users and one for guests.
If user is logged in, it returns the CacheHeaderManager set as ConfigUsermanagement::CACHEHEADER_CLASS_LOGGEDIN
Appends [g] or [u] to the first cache key
Definition at line 13 of file loggedinswitchcachemanager.cls.php.
Member Function Documentation
LoggedInSwitchCacheManager::get_cache_header_manager | ( | ) |
Get cache header manager.
- Returns:
- ICacheHeaderManager
Reimplemented from ConstantCacheManager.
Definition at line 28 of file loggedinswitchcachemanager.cls.php.
00028 { 00029 if (Users::is_logged_in()) { 00030 return CacheHeaderManagerFactory::create(Config::get_value(ConfigUsermanagement::CACHEHEADER_CLASS_LOGGEDIN)); 00031 } 00032 else { 00033 return parent::get_cache_header_manager(); 00034 } 00035 }
LoggedInSwitchCacheManager::get_cache_id | ( | ) |
Return a chache id.
Reimplemented from SuccessCacheManager.
Definition at line 17 of file loggedinswitchcachemanager.cls.php.
00017 { 00018 $ret = Arr::force(parent::get_cache_id(), false); 00019 $ret[0] .= Users::is_logged_in() ? '[u]' : '[g]'; 00020 return $ret; 00021 }
The documentation for this class was generated from the following file:
- contributions/usermanagement/controller/base/cachemanager/loggedinswitchcachemanager.cls.php