Move updating of cache to worker