[PERF-344] Add versioning of cached course assets to allow graceful cache invalidation
When releasing the versioned assets work, we stumbled on a problem with old pickled versions of the StaticContent objects residing in cache, which triggered a bug in the code. Not wanting to blow away all cached items, we ended up having to revert and add in some backwards-compatible helper code to ease the transition. With this, we'll now utilize the version argument that Django's caching interface allows, in conjunction with a constant value that can be modified when breaking changes are being made, to let us gracefully ignore older cached course assets.
Showing
- cms/djangoapps/contentstore/tests/test_core_caching.py 4 additions, 1 deletioncms/djangoapps/contentstore/tests/test_core_caching.py
- cms/djangoapps/contentstore/views/assets.py 1 addition, 1 deletioncms/djangoapps/contentstore/views/assets.py
- cms/djangoapps/contentstore/views/tests/test_transcripts.py 1 addition, 1 deletioncms/djangoapps/contentstore/views/tests/test_transcripts.py
- common/djangoapps/cache_toolbox/core.py 0 additions, 27 deletionscommon/djangoapps/cache_toolbox/core.py
- common/djangoapps/contentserver/__init__.py 5 additions, 0 deletionscommon/djangoapps/contentserver/__init__.py
- common/djangoapps/contentserver/caching.py 49 additions, 0 deletionscommon/djangoapps/contentserver/caching.py
- common/djangoapps/contentserver/middleware.py 1 addition, 1 deletioncommon/djangoapps/contentserver/middleware.py
- lms/djangoapps/courseware/tests/test_video_handlers.py 1 addition, 1 deletionlms/djangoapps/courseware/tests/test_video_handlers.py
Loading
Please register or sign in to comment