Hi,
I'd like to thank again to Brad and Mathieu for this nice piece of open source code now called Perkeep!
I wanted to create a disk based file cache that can keep more than the sum of its files - using the chunking and deduplication, it's possible.
so I needed to connect the blob usage with some eviction policy.
It can be done by writing a specific blobserver.Storage, but that seemed inelegant.
At last, I've written a simple "trace" blobserver (under blobserver/trace) that simply calls the configured functions on each Fetch/Remove/Receive/Enumerate.
With that, it was easy to combine a badger based (blobserver/badger) Storage with a TinyLFU eviction policy (using dgraph-io/ristretto, because I'm lazy).
This wasn't possible without Go's embedding philosophy, interfaces,
and the countless times Brad refused my CLs with constructive critics.
The biggest lack of Perkeep for me now is some middle level configuration, that allows the same detailed composability as the low-level JSON config,
but with better read & writeability for humans. I'll keep an eye on the config adapters of Caddy v2, maybe we can reuse them.
Thanks,
Tamás Gulácsi