Use ristretto algorithm for a (LRU) set (instead of a KV cache)

Hi, I have a use case that ristretto doesn’t seem (?) optimized for, but might be.

I have a need to store whether I’ve seen a value (strings). Requirements

  • No false positives.
  • There may be false negatives.
  • There will be concurrent inserts and reads.
  • It may not use unbounded memory.

This seems like a job for an LRU set (not an LRU map). But it looks like ristretto only offers an interface for adding a key and a value. Some questions:

  • If I pass a struct{} as a value (0 bytes), what is the overhead?
  • Could ristretto offer an API for this that is better optimized?