#include <WebModules.h>
|
| CWebSessionMap (unsigned int uTTL=5000) |
|
void | FinishUserSessions (const CUser &User) |
|
void | AddItem (const CString &Item) |
| This function adds an item to the cache using the default time-to-live value.
|
|
void | AddItem (const CString &Item, unsigned int uTTL) |
| This function adds an item to the cache using a custom time-to-live value.
|
|
void | AddItem (const CString &Item, const std::shared_ptr< CWebSession > &Val) |
| This function adds an item to the cache using the default time-to-live value.
|
|
void | AddItem (const CString &Item, const std::shared_ptr< CWebSession > &Val, unsigned int uTTL) |
| This function adds an item to the cache using a custom time-to-live value.
|
|
bool | HasItem (const CString &Item) |
| Performs a Cleanup() and then checks to see if your item exists.
|
|
std::shared_ptr< CWebSession > * | GetItem (const CString &Item) |
| Performs a Cleanup() and returns a pointer to the object, or nullptr.
|
|
bool | RemItem (const CString &Item) |
| Removes a specific item from the cache.
|
|
void | Cleanup () |
| Cycles through the queue removing all of the stale entries.
|
|
void | Clear () |
| Clear all entries.
|
|
std::map< CString, std::shared_ptr< CWebSession > > | GetItems () |
| Returns all entries.
|
|
void | SetTTL (unsigned int u) |
|
unsigned int | GetTTL () const |
|
◆ iterator
◆ value
◆ CWebSessionMap()
CWebSessionMap::CWebSessionMap |
( |
unsigned int |
uTTL = 5000 | ) |
|
|
inline |
◆ AddItem() [1/4]
This function adds an item to the cache using the default time-to-live value.
- Parameters
-
Item | the item to add to the cache |
◆ AddItem() [2/4]
This function adds an item to the cache using the default time-to-live value.
- Parameters
-
Item | the item to add to the cache |
Val | The value associated with the key Item |
◆ AddItem() [3/4]
This function adds an item to the cache using a custom time-to-live value.
- Parameters
-
Item | the item to add to the cache |
Val | The value associated with the key Item |
uTTL | the time-to-live for this specific item |
◆ AddItem() [4/4]
This function adds an item to the cache using a custom time-to-live value.
- Parameters
-
Item | the item to add to the cache |
uTTL | the time-to-live for this specific item |
◆ Cleanup()
Cycles through the queue removing all of the stale entries.
◆ Clear()
◆ FinishUserSessions()
void CWebSessionMap::FinishUserSessions |
( |
const CUser & |
User | ) |
|
◆ GetItem()
Performs a Cleanup() and returns a pointer to the object, or nullptr.
- Parameters
-
Item | The item to check for |
- Returns
- Pointer to the item or nullptr if there is no suitable one
◆ GetItems()
◆ GetTTL()
◆ HasItem()
Performs a Cleanup() and then checks to see if your item exists.
- Parameters
-
Item | The item to check for |
- Returns
- true if item exists
◆ RemItem()
Removes a specific item from the cache.
- Parameters
-
Item | The item to be removed |
- Returns
- true if item existed and was removed, false if it never existed
◆ SetTTL()
◆ m_mItems
Map of cached items.
The value portion of the map is for the expire time
◆ m_uTTL
Default time-to-live duration.
The documentation for this class was generated from the following file: