|
occ
|
Documents on disk, one file per key. Persists between runs. More...
#include <json_cache.h>
Public Member Functions | |
| std::optional< nlohmann::json > | load (const std::string &key) const override |
The document stored under key, or nothing if there is none. | |
| void | store (const std::string &key, const nlohmann::json &doc) override |
| std::string | location (const std::string &key) const override |
Where key lives, for log messages: "file <key>" or "memory [<key>]". | |
Public Member Functions inherited from occ::io::JsonCache | |
| virtual | ~JsonCache ()=default |
Documents on disk, one file per key. Persists between runs.
|
overridevirtual |
The document stored under key, or nothing if there is none.
A document that exists but cannot be parsed is an error, not a miss.
Implements occ::io::JsonCache.
|
overridevirtual |
Where key lives, for log messages: "file <key>" or "memory [<key>]".
Implements occ::io::JsonCache.
|
overridevirtual |
Implements occ::io::JsonCache.