@Override
    public void createNode(Node node) {
        log.debug( "Creating node: {}", node.getUniqueIdentifier() );
        final List<NodeOperation> operations = nodesToProcess.computeIfAbsent( node.getUniqueIdentifier(), id -> new ArrayList<>() );
        // Don't purge pending operations. It'd be odd for operations to already exist at this stage. It'd be possible for
        // a node to be recreated, which could mean that there's a DELETE. When there are other operations, the pre-'nodesToProcess'
        // behavior will kick in (which would presumably lead to database constraint-related exceptions).
        operations.add( NodeOperation.create( node ) );

        // If the node that's created is the root node of a service, persist it immediately. Without this, the pubsub (pep) service
        // that is defined by this root node doesn't exist, which causes issues when attempting to create the service. OF-2016
        if ( node instanceof CollectionNode && node.getParent() == null) {
            flushPendingNode( node.getUniqueIdentifier() );
        }
    }
Cache for recently accessed published items.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/CachingPubsubPersistenceProvider.java