Fix cache cleaner

Backport for 2014.1
Merge pull request #13117 from cachedout/cache-2014

Cache fix backport