Testing cache functionality