| 40 | KeyValueStore::~KeyValueStore() = default; |
| 41 | |
| 42 | void KeyValueStore::store(const StringBox& key, const BytesView& blob, uint64_t ttlSeconds, uint64_t weight) { |
| 43 | uint64_t expirationDateSeconds = 0; |
| 44 | if (ttlSeconds != 0) { |
| 45 | expirationDateSeconds = currentTimeSeconds() + ttlSeconds; |
| 46 | } |
| 47 | |
| 48 | _entries[key] = KeyValueStoreEntry(++_mutationId, expirationDateSeconds, weight, blob); |
| 49 | } |
| 50 | |
| 51 | std::optional<BytesView> KeyValueStore::fetch(const StringBox& key, bool updateSequence) { |
| 52 | auto it = _entries.find(key); |
nothing calls this directly
no test coverage detected