-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel view broken with Kolibri 0.16.0-beta6 #872
Comments
dbnicholson
added a commit
that referenced
this issue
Oct 5, 2023
The Kolibri `metadata_cache` decorator is tied to the content lifetime, but that has nothing to do with the channel app data. Furthermore, `metadata_cache` in Kolibri 0.16.0-beta6 is broken for this usage since regular `View` classes don't have `render` functions. Instead, simply use the `cache_control` decorator to set `max-age=600`. This caches the responses for 10 minutes. Even though these are likely very static, I don't want to set these longer for now since we have no control over when the apps bundle gets updated. Fixes: #872
dbnicholson
added a commit
that referenced
this issue
Oct 6, 2023
The Kolibri `metadata_cache` decorator is tied to the content lifetime, but that has nothing to do with the channel app data. Furthermore, `metadata_cache` in Kolibri 0.16.0-beta6 is broken for this usage since regular `View` classes don't have `render` functions[1]. Instead, simply use the `cache_control` decorator to set the max age for a week. Since these URLs always contain the plugin version (and the files in the channel zips are generally cache busting), it should be safe to essentially never expire the responses. Fixes: #872 1. learningequality/kolibri#11362
This was released in 7.7.0 and is in all the apps. |
Verified passed in Chromebook 7.8-415 | Flatpack v0.7 10-16 | Windows 7.8.1.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was originally endlessm/kolibri-installer-android#190. Currently,
AppView
is usingmetadata_cache
. That causes an exception in 0.16.0-beta6 becausemetadata_cache
was changed to handle the cache value itself instead of letting the Django middleware do it. The problem is thatAppView
is a regular DjangoView
without arender
callable.That's a Kolibri bug that I'll report upstream. Fortunately, it should be easy to fix downstream as that's abusing
metadata_cache
, anyways.The text was updated successfully, but these errors were encountered: