It seems each thread maintains its separate cache. Should I just use my own Django object to have a Database cache shared by multiple threads? What are the negatives to doing this?
The problem I am facing is this:
- I am using the database cache
- I save to the cache while processing a request
- I retrieve from the cache while processing the next request
I expect it to be in the cache but it is not there. By printing the thread ident, I see it is a different thread. The same thread gets a cache hit but a different thread gets a cache miss.
I don't expect this to happen with the database cache backend.