Generated OG image cache grows unbounded — no cleanup mechanism #51
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Generated/resized OG images are stored in
images/mokoog/generated/with no eviction or cleanup mechanism.ImageHelper::cleanup()exists but is never called anywhere in the codebase.On sites with many articles, this directory grows indefinitely.
Fix
Options (pick one or combine):
ImageHelper::cleanup()to a Joomla scheduled task (plg_task_*)php cli/mokoog.php cleanup)Files
source/packages/plg_system_mokoog/src/Helper/ImageHelper.php:154-165(existing cleanup method)source/packages/plg_system_mokoog/src/Helper/ImageGenerator.php(generates images)Branch created:
feature/51-generated-og-image-cache-grows-unboundedLow priority —
ImageHelper::cleanup()exists but has no callers.ImageGenerator::generate()also has no callers. Cache growth is theoretical until image generation is wired into a workflow. Can address when image generation is actually activated.