Cache read function