reworked caching layer