Cache freshness function.