Closed kolinfluence closed 5 months ago
Maybe there is a misunderstanding. There is no single-threaded "mode".
If your cache is only accessed by a single thread/go-routine (concurrency = 1), you should use freelru.New()
instead of freelru.NewSynced()
or freelru.NewSharded()
. The created LRU/cache doesn't use locking.
The underlying data structure is a hashmap, so you need to provide a hash function.
@rockdaboot ok thx.
for single threaded "mode" do you still need hash? is it possible to disable hash for single threaded mode?
how do you use single threaded mode by the way?