themotte / rDrama

This code runs https://www.themotte.org. Forked from https://github.com/Aevann1/rDrama
GNU Affero General Public License v3.0
25 stars 31 forks source link

Ensure all Redis-backed caching has a timeout or pruning logic #618

Open TLSM opened 1 year ago

TLSM commented 1 year ago

At time of fork, it was part of the semi-frequent maintenance process to delete every key in Redis. This is because some uses of flask-caching did not have cache timeouts set. Or, for places like the logged-in counter that store data directly, were not pruning old entries.

Redis will soon be persisted across restarts, and this issue is timely and likely needs resolved within a couple weeks before performance issues accumulate (diagnosable by a sampling profiler spending >20% time in json.loads).