learningequality / learningequality/studio
Utilities to clear recommendations cache
Open
@bjester is already working on this.
Since May 11, 2026.
DEV: backend
P1 - important
TAG: new feature
TAG: performance
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Current behavior
When Studio queries the Curriculum Automation API for recommendations, it caches the results in a table defined by the model RecommendationsCache. If a channel in the Kolibri Content Library (a public channel) changes and is republished, new recommendations could be applicable and old recommendations could be invalid.
Desired behavior
- A Django management should be created that:
- should delete all data from the
RecommendationsCache
- should delete all data from the
- A utility function should be created that:
- should accept a
channel_idas an argument - should find all
request_hashthat have records with a matchingchannel_id - should delete all records with those
request_hash - should be called during channel publishing, for that channel, when
delete_public_channel_cache_keys()is called
- should accept a
Value add
- Allows us to do targeted cache clearing for prior recommendation requests that had recommendations from recently updated and published channels
- Allows us to do full cache clearing on a schedule, which will allow matching new recommendations for content that wasn't previously recommended
Possible tradeoffs
- Ideally, we release performance improvement prior to doing more aggressive cache clearing
- Targeted cache clearing doesn't cover all situations and may not be worthwhile long-term, but probably worthwhile until we better understand our performance limitations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.