boldenamsterdam / htmlcache

Cache pages to HTML and boost website performance on Craft CMS 3
MIT License
31 stars 21 forks source link

404 pages being cached as well #22

Open jurriaanr opened 4 years ago

jurriaanr commented 4 years ago

It looks like pages that result in a 404 response are cached as well. In our case the 404 page itself uses a template which does a few queries, which means the elements cache is used. This allows for an easy to execute dos attack possibility on our site. In our case it is a continuing pen test which calls random url, each creating a record in the cache table, which causes the elements table to fill up with millions of records. I don't think it should cache a 404 response, but I could see some merit for it. But an option to avoid caching 404 responses would make sense.