Caches data while intelligently managing a history of previous states.