class cache with lru-cache, updating tests