Cache fix backport

Backported for 2014.1