sievecache 0.4.0
A SIEVE Cache implementation in D
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
SIEVE Cache in D
An implementation of the SIEVE Cache eviction algorithm for D. This implementation is fully inspired by Rust's sieve-cache implementation.
Usage
import sievecache;
import std.stdio;
void main()
{
auto cache = SieveCache!(string, string)(10_000);
cache["foo"] = "foocontent";
cache["bar"] = "barcontent";
cache.remove("bar");
writeln(cache["foo"]); // "foocontent"
writeln(!cache.contains("bar")); // false
writeln(cache.length); // 1
writeln(cache.capacity); // 10000
}
Development
Testing
dub test
Lint
dub lint
Serve the docmentation on a local server
dub run -b ddox
- Registered by Hiroki Noda
- 0.4.0 released 7 months ago
- kubo39/sieve-cache-d
- MIT
- Copyright © 2024 Hiroki Noda
- Authors:
- Dependencies:
- none
- Versions:
-
0.4.0 2024-May-30 0.3.1 2024-May-20 0.3.0 2024-May-19 0.2.1 2024-May-18 0.2.0 2024-May-16 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
5 downloads total
-
- Score:
- 0.3
- Short URL:
- sievecache.dub.pm