How to understand this exception error in context?
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.