techmatters / terraso-backend

A Django project that powers the backend of Terraso platform.
GNU Affero General Public License v3.0
21 stars 4 forks source link

debt: implement automated cache eviction for soil ID cache #1358

Open shrouxm opened 2 months ago

shrouxm commented 2 months ago

Description

Currently the SoilIDCache table has no automated cache eviction, so it will slowly fill up over time. We should add data deletion commands to do some combination of:

We're not in a rush to do this because it's possible we'll be switching architectures for offline support anyway before the cache gets too full.

Additional context

See e.g. the clean_up_deleted_files command for an example of defining a command, and this file for an example of triggering it to run regularly.