2

I have been trying to fine tune the performance of a heavy page: see Category query very slow on multilingual site

It appears that my initial hope of getting the page under 2 seconds was not quite accurate. After cache tagging the page the performance was great. However I had left out an {% endcache %} tag - ie not closed it. This makes the performance in the network inspector less than 1 sec to load. Very nice.

However I am using Nginx microcaching set to 1 sec. As soon as I cleared the Nginx cache i started seeing the error in my template tag that was missing the closing cache tag.

So why does it load lightning fast with an unclosed tag?

When experimenting with placement of cache tags, I also managed to generate the following error in dev mode:

An exception has been thrown during the compilation of a template 
("Node "body" does not exist for Node "Craft\Cache_Node".").

I was wondering what exactly this means / indicates and if there is some interaction effect I am getting between craft cache and my Nginx server cache?

1

If you leave off the closing {% endcache %} tag, then you should always get the error that you received with devMode enabled. If devMode is disabled, you'll get the default 500 error template.

I would disable the nginx microcaching while you're testing this to make sure that you're not getting erroneous caching results.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.