added code for reading cached values