You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zipcontent caches 404s for a year and omits remote_baseurl from the cache key #16154
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: develop
Observed behavior
In kolibri/core/content/zip_wsgi.py (_zip_content_from_request, lines 374-401 on develop, 646b04dd), non-streaming responses are cached for a year (YEAR_IN_SECONDS). Two things look off:
CACHE_KEY is only ZIPCONTENT_VIEW_RESPONSE_{zipped_filename}/{embedded_filepath}. remote_baseurl is omitted even though the same zip path can be served locally or from a peer.
create_error_response returns a normal HttpResponse (404), not a StreamingHttpResponse. If the zip exists but an embedded file does not, that 404 gets stored with cache.set(..., YEAR_IN_SECONDS).
Expected behavior
Include remote_baseurl (and local vs. peer) in the cache key, and avoid caching 404 responses for a year so a file that becomes available later is not stuck as missing.
User-facing consequences
A learner can keep getting a cached 404 for a file added later, or receive a cached response from the wrong peer for the same zip path.
Steps to reproduce
Open _zip_content_from_request in kolibri/core/content/zip_wsgi.py.
Confirm CACHE_KEY only uses zipped_filename and embedded_filepath.
Confirm get_embedded_file can return create_error_response (404 HttpResponse), which then hits cache.set(..., YEAR_IN_SECONDS).
📝 This issue doesn't follow one of our issue templates yet. It is closest to Report a bug. Please edit the description to fix:
## AI usage is missing.
The check runs again when you save, and this comment goes away once it passes. We review the issue after that. If it still doesn't follow a template in 7 days, it will be closed.
Activity
learning-equality-bot commentedon Dec 3, 2026
📝 This issue doesn't follow one of our issue templates yet. It is closest to Report a bug. Please edit the description to fix:
## AI usageis missing.The check runs again when you save, and this comment goes away once it passes. We review the issue after that. If it still doesn't follow a template in 7 days, it will be closed.