Improve internal caching system