Set up caching scheme