Changed the way metadata cache is stored