Closed karlkowald closed 2 years ago
Hi @karlkowald
thanks for the report! We will take a look at it.
Have you solved the problem already? If yes, can you provide a PR?
Hi @Zodiac1978 i just solved it and started a pull request for it -> https://github.com/pluginkollektiv/cachify/pull/267
should do what it should and you can overrule it with own statuscodes if you want.
We are using the nginx-hdd Version of cachify and triggered a problem. We had a project which produced in frontend a critical error message, which was handled by WordPress with his ""There has been a critical error on this website." output, delivered with a http-status-code 500.
But cachify saved the output and next time, nginx found the saved file and delivered it as expected with http-status-code 200.
So the problem is, that there shouldnt be a cache-file created if the http-status-code is not 200 in my opinion. Perhaps you should add this check vor error-handling before you write the cache.
Thanks a lot
https://github.com/pluginkollektiv/cachify/blob/9ea110bfc39e677793884076b42b3a14f213da77/inc/class-cachify.php#L1395