private void flushPendingNodes()
    {
        log.trace( "Flushing pending nodes (count: {})", nodesToProcess.size() );

        // TODO verify that this is thread-safe.
        final Iterator<List<NodeOperation>> iterator = nodesToProcess.values().iterator();
        while (iterator.hasNext()) {
            final List<NodeOperation> operations = iterator.next();
            operations.forEach( this::process );
            iterator.remove();
        }
    }
Cache for recently accessed published items.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/CachingPubsubPersistenceProvider.java