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.
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.