Update logic and usage of caches