Bridges-C++
3.4.4
Bridges(C++ API)
|
#include <Cache.h>
object managing a disk cache for which ever purpose needed.
This object is not meant to be used directly by the end-user (student or instructor) but rather to be used internally for caching purposes.
The cache is created according to XDG ( https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html ) that it is to it is created in $XDG_CACHE_HOME/bridges_data/cxx/ if XDG_CACHE_HOME is defined or $HOME/.cache/bridges_data/cxx/ otherwise. On windows it is created in $LOCALAPPDATA/.cache/bridges_data/cxx/ .
You can force a different cache location by setting $FORCE_BRIDGES_CACHEDIR .
Public Member Functions | |
SimpleCache () | |
virtual | ~SimpleCache ()=default |
virtual bool | inCache (const std::string &docName) noexcept(false) override |
virtual std::string | getDoc (const std::string &docName) noexcept(false) override |
virtual void | putDoc (const std::string &docName, const std::string &content) noexcept(false) override |
bool | evict (const std::string &docName) |
evicts a document from the cache More... | |
|
inline |
|
virtualdefault |
|
inline |
evicts a document from the cache
docName | document to evict |
|
inlineoverridevirtualnoexcept |
Implements bridges::Cache.
|
inlineoverridevirtualnoexcept |
Implements bridges::Cache.
|
inlineoverridevirtualnoexcept |
Implements bridges::Cache.