Add "404 lifetime" to module to help with performance tuning

Created on 7 May 2025, about 2 months ago

Problem/Motivation

-The current code deletes the HTML file every cache clear or cron run.
-Some sites will run cron quite frequently, resulting in the 404 page being thrown out a lot more often than necessary.

Steps to reproduce

-View a 404 page, you get a generated 404.html page, nice job module!
-Trigger cron. 404.html page goes away. Wow that was fast...

Proposed resolution

-Add a config page with a cache lifetime setting.
-Break HTML delete code into it's own function.
-Cache clear will now call delete function directly instead of the hook cron function.
-Hook cron will now only delete 404html if lastRunTime + cacheLifetime <= NOW

Remaining tasks

User interface changes

API changes

Data model changes

-Add config for cache lifetime.
-Stash somewhere smaht lastRunTime

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jnicola

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024