Minor changes to the cache clear
Merge pull request #1052 from psav/nasty_context

Minor changes to the cache clear