@Override
    public List<PublishedItem> getPublishedItems( LeafNode node, int maxRows )
    {
        log.debug( "Getting last published items for node {} (max: {}).", node.getUniqueIdentifier(), maxRows );
        List<PublishedItem> publishedItems = getPublishedItems( node );
        if ( maxRows >= 0 && publishedItems.size() > maxRows )
        {
            publishedItems = publishedItems.subList( publishedItems.size() - maxRows, publishedItems.size() );
        }
        return publishedItems;
    }
Cache that holds all published items (mapped by node ID).
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/InMemoryPubSubPersistenceProvider.java