al8n / stretto

Stretto is a Rust implementation for Dgraph's ristretto (https://github.com/dgraph-io/ristretto). A high performance memory-bound Rust cache.
Apache License 2.0
413 stars 28 forks source link

This library doesn't seem to work properly #36

Closed phantomhker closed 1 year ago

phantomhker commented 1 year ago
  1. I created a sync cache with 6 max numbers and 3 max cost
  2. Set key-value to it and then call wait()
  3. Got key with None result
al8n commented 1 year ago

By default, the cache will add internal cost according to the value, you need to use ignore_internal_cost. Please see https://github.com/al8n/stretto#ignore_internal_cost.

phantomhker commented 1 year ago

By default, the cache will add internal cost according to the value, you need to use ignore_internal_cost. Please see https://github.com/al8n/stretto#ignore_internal_cost.

thanks for a lot