Skip to content

Daily tasks processes 'first_date'

From https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/6L5HZKLIINHRKQNX6UOIGEW7BB62K4ET/

After an import, "Threads by Month" doesn't refresh and show older imports.

Here is my interpretation about what is happening. The time of the first post is calculated once and stored indefinitely in the cache.

From the redis cache:

127.0.0.1:6379> KEYS *first*
1) ":1:MailingList:1:first_date"

That has a TTL of -1, never expire. In ./hyperkitty/models/common.py it says "timeout = None". No timeout.
By adding "first_date" to the so-called "recent_cached_values" array it will be recomputed by daily cron jobs. Otherwise it will never be recomputed. Since this is not an expensive query, it doesn't hurt to run it periodically.

A workaround:

127.0.0.1:6379> DEL ":1:MailingList:1:first_date"

Merge request reports

Loading