Fix cache directory invalidate