Suor / django-cacheops

A slick ORM cache with automatic granular event-driven invalidation.
BSD 3-Clause "New" or "Revised" License
2.12k stars 227 forks source link

Not working With Redis In Cluster Mode #451

Closed syedali7 closed 1 year ago

syedali7 commented 1 year ago

The settings variable CACHEOPS_REDIS asks for db and works well with non cluster instance but not working with cluster mode as the connection should not mention db name.

Please help us here if there is any other way of using this library in cluster mode.

Suor commented 1 year ago

There is no direct support for any form of distributed cache currently. The discussion is going in #35.

Two approaches are achievable with a reasonable effort:

  1. Sharding cache via dynamic CACHEOPS_PREFIX containing {...}, see https://github.com/Suor/django-cacheops#sharing-redis-instance and discussion in #35.
  2. Using a new insideout mode with some refinements.

Both usually also invlolve custom CACHEOPS_CLIENT_CLASS. Also many people modify cacheops to their needs but there is no of the shelve solution.

Suor commented 1 year ago

Please reopen if I understood your issue incorrectly.