private CacheEntry update(RoutingContext ctx) {
        String key = getCacheKey(ctx);
        CacheEntry entry = cache.get(key);
        if (entry == null) {
            entry = new CacheEntry();
            cache.put(key, entry);
        }

        int upd = ctx.getMirror().updates();
        if (entry.generation != upd) {
            entry.generation = upd;
            entry.recipients.clear();
            for (int i = 0; i < ctx.getNumRecipients(); ++i) {
                List<Mirror.Entry> arr = ctx.getMirror().lookup(ctx.getRecipient(i).getHop(0).toString());
                for (Mirror.Entry item : arr) {
                    entry.recipients.add(Hop.parse(item.getName()));
                }
            }
        }
        return entry;
    }
Updates and returns the cache entry for the given routing context. This method assumes that synchronization is
handled outside of it.

@param ctx The routing context.
@return The updated cache entry.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoundRobinPolicy.java