private void process( final NodeOperation operation ) {
        switch ( operation.action )
        {
            case CREATE:
                delegate.createNode( operation.node );
                break;

            case UPDATE:
                delegate.updateNode( operation.node );
                break;

            case REMOVE:
                delegate.removeNode( operation.node );
                break;

            case CREATE_AFFILIATION:
                delegate.createAffiliation( operation.node, operation.affiliate );
                break;

            case UPDATE_AFFILIATION:
                delegate.updateAffiliation( operation.node, operation.affiliate );
                break;

            case REMOVE_AFFILIATION:
                delegate.removeAffiliation( operation.node, operation.affiliate );
                break;

            case CREATE_SUBSCRIPTION:
                delegate.createSubscription( operation.node, operation.subscription );
                break;

            case UPDATE_SUBSCRIPTION:
                delegate.updateSubscription( operation.node, operation.subscription );
                break;

            case REMOVE_SUBSCRIPTION:
                delegate.removeSubscription( operation.subscription );
                break;

            default:
                throw new IllegalStateException(); // This indicates a bug in the implementation of this class.
        }
    }
Cache for recently accessed published items.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/CachingPubsubPersistenceProvider.java