Ensure cache entries are invalidated even for uncacheable POST-like requests.

Closes #228.