Commit 754ada9c by Nimisha Asthagiri

Merge pull request #3668 from edx/opaque-keys-fix-cache-content-diff-runs

Fix delete cache so it also deletes location with run = None.
parents 558e9c8f e9052dc2
......@@ -118,4 +118,9 @@ def get_cached_content(location):
def del_cached_content(location):
cache.delete(unicode(location).encode("utf-8"))
# delete content for the given location, as well as for content with run=None.
# it's possible that the content could have been cached without knowing the
# course_key - and so without having the run.
cache.delete_many(
[unicode(loc).encode("utf-8") for loc in [location, location.replace(run=None)]]
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment