Remove above-ndb memcaching #6496
Labels
architectural refactor
Architectural refactors that clean up the codebase
backend
enhancement
Label to indicate an issue is a feature/improvement
Impact: High
Blocks or significantly slows down a core workflow.
needs design doc
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Per https://cloud.google.com/appengine/docs/standard/python/ndb/cache, NDB performs both in-context and NDB caching for all reads and writes, and does auto-batching for group operations. This is enabled by default, and likely leads to our own memcache operations being completely redundant. Also, NDB properly handles race conditions that can arise when reading and writing to memcache without compare-and-swap operations, which Oppia doesn't currently do.
To summarize, removing our memcaching will likely result in:
We can still use memcache for caching outputs of expensive computations, but I don't think we do that anywhere (we generally rely on NDB for this purpose).
The text was updated successfully, but these errors were encountered: