Caching data into a useful structure