Cache2: various fixes