Releases: C-Pro/geche
Fix MapTTL tail/head overwrite
What's Changed
- fix: map ttl reinsert head or tail by @arthhhhh23 in #14
Full Changelog: v1.3.0...v1.3.1
v1.3.0 add SetIfPresent
New function for atomic SetIfPresent
operation:
// SetIfPresent sets the kv only if the key was already present
// and returns the previous value (if any) and whether the insertion was performed
SetIfPresent(K, V) (V, bool)
kudos for @arthhhhh23 for implementing this
KV leaf node memory optimization
Optimization to store leaf nodes as single node with multi-byte suffix instead of a set of single-byte nodes to optimize both memory consumption (about 50x less memory used for long keys) as well as CPU usage reduction due to less iterations needed to reach terminal node.
For example before optimization keys "apple" and "approve" were stored this way (one node per character):
a - p - p - l - e
|
r - o - v - e
After "tail aggregation" the suffix parts of both keys can be aggregated in the single node:
a - p - p - le
|
rove
Fix leak of trie nodes on delete
Do backwards walk to trie root removing all arcs that don't have leaf nodes.
Fix ListByPrefix
Fix error in ListByPrefix
DFS walk, when key length difference was more than 1.
Initial release
Initial release with several cache implementations and wrappers to provide extra functionality.