com.endeca.portal.mdex.cache
Class NaiveEternalCacheManager
java.lang.Object
com.endeca.portal.mdex.cache.NaiveEternalCacheManager
- All Implemented Interfaces:
- MDEXCacheManager
public class NaiveEternalCacheManager
- extends java.lang.Object
- implements MDEXCacheManager
EXPERIMENTAL AND UNSUPPORTED!!!! This cache manager uses ehcache to store
query results for as long as possible. Configure ehcache using Liferay's
configuration files.
This class is GUARANTEED to return incorrect results in the face of data
updates to the MDEX Engine. Furthermore, due to the toJSON/toXML methods
required to generate a cache key, this manager is expensive and slow. Finally,
since MDEX Engine queries are extremely varied, this class is likely to be
a resource hog, to the point of hurting overall performance of your server.
This class is provided as a proof of concept only.
- Author:
- Endeca Technologies, Inc.
Method Summary |
void |
cacheResults(com.endeca.mdex.conversation.ConversationPort port,
com.endeca.mdex.conversation.Request query,
com.endeca.mdex.conversation.Results results)
Put results into the cache for MDEX 7 queries |
com.endeca.mdex.conversation.Results |
getCachedResults(com.endeca.mdex.conversation.ConversationPort port,
com.endeca.mdex.conversation.Request query)
Get the cached version of results for MDEX 7 queries |
boolean |
isQueryCached(com.endeca.mdex.conversation.ConversationPort port,
com.endeca.mdex.conversation.Request query)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NaiveEternalCacheManager
public NaiveEternalCacheManager()
isQueryCached
public boolean isQueryCached(com.endeca.mdex.conversation.ConversationPort port,
com.endeca.mdex.conversation.Request query)
getCachedResults
public com.endeca.mdex.conversation.Results getCachedResults(com.endeca.mdex.conversation.ConversationPort port,
com.endeca.mdex.conversation.Request query)
- Description copied from interface:
MDEXCacheManager
- Get the cached version of results for MDEX 7 queries
- Specified by:
getCachedResults
in interface MDEXCacheManager
- Returns:
- the cached results
cacheResults
public void cacheResults(com.endeca.mdex.conversation.ConversationPort port,
com.endeca.mdex.conversation.Request query,
com.endeca.mdex.conversation.Results results)
- Description copied from interface:
MDEXCacheManager
- Put results into the cache for MDEX 7 queries
- Specified by:
cacheResults
in interface MDEXCacheManager