Fix cache clear

Changes to fix the broken cache clear