smarter caching and split inputs between data and prices