Inflation’s been happening since currency was created. We don’t notice day to day because the effects are stretched over a long period.
Try calculating the value of a 2010 dollar against the current 2023 dollar. You’ll find the cumulative effect of ~5% inflation each year is significant.
In addition, periods exist throughout American history during which inflation has spiked noticably within a year or two - this is nowhere near the first time.
From a theory perspective alone, ignorant of Lemmy specifics: a database query can be made to list all cached images including a unique identifier for each image. Use this list to find each cached image.
Look at your cached image list and decide how you want to prune it. The most likely pattern for this system is FIFO, so prune the oldest cached data until you drop below the target disk usage.
In practice, you’ll likely use somebody else’s solution. Be sure to read the contents of their solution carefully to ensure it doesn’t move sensitive data to an externally accessible location or exfiltrate data directly.