Commit 66265367 authored by guus's avatar guus

Workaround for OF-82: make PEPService "Cacheable" (but not really). We should...

Workaround for OF-82: make PEPService "Cacheable" (but not really). We should revise this when/if we're going to introduce another caching mechanism.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11563 b35dd754-fafc-0310-a699-88a17e54d16e
parent d15c7a9b
......@@ -59,6 +59,7 @@ import org.jivesoftware.openfire.user.UserNotFoundException;
import org.jivesoftware.util.FastDateFormat;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.StringUtils;
import org.jivesoftware.util.cache.Cacheable;
import org.xmpp.packet.JID;
import org.xmpp.packet.Message;
import org.xmpp.packet.Packet;
......@@ -68,10 +69,13 @@ import org.xmpp.packet.PacketExtension;
* A PEPService is a {@link PubSubService} for use with XEP-0163: "Personal Eventing via
* Pubsub" Version 1.0
*
* @author Armando Jagucki
* Note: Although this class implements {@link Cacheable}, instances should only be
* cached in caches that have time-based (as opposed to size-based) eviction policies.
*
* @author Armando Jagucki
*/
public class PEPService implements PubSubService {
public class PEPService implements PubSubService, Cacheable {
/**
* Timer to save published items to the database or remove deleted or old
* items.
......@@ -590,4 +594,9 @@ public class PEPService implements PubSubService {
items_task_timeout = timeout;
}
public int getCachedSize() {
// Rather arbitrary. Don't use this for size-based eviction policies!
return 600;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment