ZNC
trunk
|
#include <WebModules.h>
Public Member Functions | |
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. More... | |
void | AddItem (const CString &Item, unsigned int uTTL) |
This function adds an item to the cache using a custom time-to-live value. More... | |
void | AddItem (const CString &Item, const CSmartPtr< CWebSession > &Val) |
This function adds an item to the cache using the default time-to-live value. More... | |
void | AddItem (const CString &Item, const CSmartPtr< CWebSession > &Val, unsigned int uTTL) |
This function adds an item to the cache using a custom time-to-live value. More... | |
bool | HasItem (const CString &Item) |
Performs a Cleanup() and then checks to see if your item exists. More... | |
CSmartPtr< CWebSession > * | GetItem (const CString &Item) |
Performs a Cleanup() and returns a pointer to the object, or NULL. More... | |
bool | RemItem (const CString &Item) |
Removes a specific item from the cache. More... | |
void | Cleanup () |
Cycles through the queue removing all of the stale entries. More... | |
void | Clear () |
Clear all entries. More... | |
void | SetTTL (unsigned int u) |
unsigned int | GetTTL () const |
Protected Types | |
typedef std::pair< unsigned long long, CSmartPtr < CWebSession > > | value |
typedef std::map< CString, value >::iterator | iterator |
Protected Attributes | |
std::map< CString, value > | m_mItems |
Map of cached items. More... | |
unsigned int | m_uTTL |
Default time-to-live duration. More... | |
|
protectedinherited |
|
protectedinherited |
|
inline |
|
inlineinherited |
This function adds an item to the cache using the default time-to-live value.
Item | the item to add to the cache |
|
inlineinherited |
This function adds an item to the cache using a custom time-to-live value.
Item | the item to add to the cache |
uTTL | the time-to-live for this specific item |
|
inlineinherited |
This function adds an item to the cache using the default time-to-live value.
Item | the item to add to the cache |
Val | The value associated with the key Item |
|
inlineinherited |
This function adds an item to the cache using a custom time-to-live value.
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 |
|
inlineinherited |
Cycles through the queue removing all of the stale entries.
|
inlineinherited |
Clear all entries.
void CWebSessionMap::FinishUserSessions | ( | const CUser & | User | ) |
|
inlineinherited |
Performs a Cleanup() and returns a pointer to the object, or NULL.
Item | The item to check for |
|
inlineinherited |
|
inlineinherited |
Performs a Cleanup() and then checks to see if your item exists.
Item | The item to check for |
|
inlineinherited |
Removes a specific item from the cache.
Item | The item to be removed |
|
inlineinherited |
|
protectedinherited |
Map of cached items.
The value portion of the map is for the expire time
|
protectedinherited |
Default time-to-live duration.