Add function that check cache variable