Added clearing of metadata cache before update