Fix delete cache so it also deletes location with run = None.
This commit is contained in:
@@ -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)]]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user