sievecache 0.3.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 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.insert("foo", "foocontent");
cache.insert("bar", "barcontent");
cache.remove("bar");
writeln(*cache.get("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
- 0.3.0 released 4 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
-
4 downloads total
-
- Score:
- 0.2
- Short URL:
- sievecache.dub.pm