reworked caching system