patch for rebuilding cache