Allow to use hash() instead of __ring_key__ for in-memory storage
Closed this issue · 0 comments
youknowone commented
Because hash()
returns diffrent values by processes, it should be used only for in-memory storages.
Still, in-memory cache is a big part of use case of ring.
Implementation note:
- Add in-memory storage marker to storage.
- Fix coerce() function to receive whether hash() is allowed or not.
- The priority is:
- Call ring_key first
- Fallback to hash() if it is allowed
- Warning if nothing available