Crow  1.1
A C++ microframework for the web
 
Loading...
Searching...
No Matches
crow::session::ExpirationTracker Struct Reference

Expiration tracker keeps track of soonest-to-expire keys. More...

#include <session.h>

Public Types

using DataPair = std::pair< uint64_t, std::string >
 
using iterator = typename std::set< DataPair >::const_iterator
 

Public Member Functions

void add (std::string key, uint64_t time)
 
void remove (const std::string &key)
 
uint64_t peek_first () const
 Get expiration time of soonest-to-expire entry.
 
std::string pop_first ()
 
iterator begin () const
 
iterator end () const
 

Detailed Description

Expiration tracker keeps track of soonest-to-expire keys.

Member Function Documentation

◆ add()

void crow::session::ExpirationTracker::add ( std::string  key,
uint64_t  time 
)
inline

Add key with time to tracker. If the key is already present, it will be updated


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