|
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. | |
| 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 |
Protected Types | |
| typedef std::pair< unsigned long long, std::shared_ptr< CWebSession > > | value |
| typedef std::map< CString, value >::iterator | iterator |
Protected Attributes | |
| std::map< CString, value > | m_mItems |
| Map of cached items. | |
| unsigned int | m_uTTL |
| Default time-to-live duration. | |
|
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 |
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 nullptr.
| Item | The item to check for |
|
inlineinherited |
Returns all entries.
|
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.