richie icon indicating copy to clipboard operation
richie copied to clipboard

🐛(cache) fix course page cache

Open igobranco opened this issue 3 years ago • 4 comments

Added a middleware LimitCacheByCourseDates to prevent cache of old information on course pages.

igobranco avatar Apr 01 '22 11:04 igobranco

Fixed linting problem.

igobranco avatar Apr 01 '22 14:04 igobranco

I understand the problem but I don't hink this can be a solution as it generates queries on each request so it defeats the purpose of cache.. Maybe the cache expiration can be limited when setting it?

sampaccoud avatar Apr 02 '22 17:04 sampaccoud

I understand the problem but I don't hink this can be a solution as it generates queries on each request so it defeats the purpose of cache.. Maybe the cache expiration can be limited when setting it?

You are right. It would be better to implement the same ideia but only when adding the page to the cache. Do you have an ideia on how and where we could add this feature?

igobranco avatar Apr 04 '22 09:04 igobranco

@sampaccoud I've found the method get_cache_expiration on https://docs.django-cms.org/en/support-3.1.x/reference/plugins.html but I think it won't work because we need to change the ttl of the course template.

igobranco avatar Apr 04 '22 11:04 igobranco

Replaced by #1766

igobranco avatar Aug 30 '22 21:08 igobranco