Haio 0.2.X
Homebrew Asset IO/CDN
Loading...
Searching...
No Matches
Haio::Cdn::CacheStore Class Referenceabstract

#include <haio_cache.hpp>

Public Member Functions

virtual ~CacheStore ()=default
virtual boost::asio::awaitable< std::optional< CacheEntry > > get (const std::string &key)=0
virtual boost::asio::awaitable< void > put (const std::string &key, const CacheEntry &entry)=0

Detailed Description

a backend is chosen at runtime from the scheme of the url, which is why this is a virtual interface rather than a concept the way the codecs do it: the answer is in a config file, not in the build.

Definition at line 39 of file haio_cache.hpp.

Constructor & Destructor Documentation

◆ ~CacheStore()

virtual Haio::Cdn::CacheStore::~CacheStore ( )
virtualdefault

Member Function Documentation

◆ get()

virtual boost::asio::awaitable< std::optional< CacheEntry > > Haio::Cdn::CacheStore::get ( const std::string & key)
pure virtual

a hit renews the entry's ttl, so what is being asked for keeps living and what nobody wants ages out. the window is therefore since the last read, not since the write: a popular creative is never rebuilt on a clock.

◆ put()

virtual boost::asio::awaitable< void > Haio::Cdn::CacheStore::put ( const std::string & key,
const CacheEntry & entry )
pure virtual

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