Fixed cache so it works when the location changes