Cache logic updated.