-
Notifications
You must be signed in to change notification settings - Fork 271
Open
Labels
DEV: backendP1 - importantPriority: High impact on UXPriority: High impact on UXTAG: new featureTAG: performance
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
Metadata
Metadata
Assignees
Labels
DEV: backendP1 - importantPriority: High impact on UXPriority: High impact on UXTAG: new featureTAG: performance
