Files
edx-platform/cms/envs/devstack-experimental.yml
Régis Behmo 4daf452620 fix!: infinite growth of cache when auto eviction is disabled
See discussion here: https://github.com/overhangio/tutor/pull/984

This is a breaking change that will explicitely set the timeout of
course structure cache entries to 1 week, instead of being unlimited. If
you wish to revert to the former behaviour, you should set
`course_structure_cache["TIMEOUT"] = None`.

The course structure cache keys were previously set with an explicit
timeout of `None` which was overriding the cache default timeout of 2h.
This was OK in environments where the cache is configured with a maximum
memory limit and an automatic key eviction strategy. But in others (such
as Tutor), the course structure cache could grow infinitely.

It was agreed that course structure cache keys should be long-lived but
should respect the default cache structure timeout. Thus, we set here
the TTL to 1 week.

We can also configure Tutor to use a cache eviction policy. But that
means we need to set a `maxmemory` value in Redis. It's not possible to
set a value that will be appropriate for everyone:
- if it's higher than the total memory (e.g: in small instances), server
  will crash before the cache is filled.
- if it's too low (e.g: in large instances), the whole platform will abruptly
  slow down as many cache entries are suddenly evicted.

That question of whether Tutor should define a cache eviction policy is
still under discussion, but it can be resolved independently of this
change.
2024-02-14 08:28:37 -05:00

18 KiB