Class FileSystemCacheService
java.lang.Object
rocks.imsofa.ai.puppychatter.cache.FileSystemCacheService
- All Implemented Interfaces:
CacheService
- Author:
- lendle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheReply(List<Conversation> query, Conversation reply) getCachedReply(List<Conversation> conversations) the last conversation is the questiongetRealKey(List<Conversation> query) voidremoveCache(List<Conversation> conversations) remove the corresponding cache entrysync2BoundConversations(List<Conversation> conversations) convert each instances in the input conversation list to conversation record stored in database
-
Constructor Details
-
FileSystemCacheService
-
FileSystemCacheService
public FileSystemCacheService()
-
-
Method Details
-
getCachedReply
Description copied from interface:CacheServicethe last conversation is the question- Specified by:
getCachedReplyin interfaceCacheService- Parameters:
conversations-- Returns:
- Throws:
Exception
-
sync2BoundConversations
public List<Conversation> sync2BoundConversations(List<Conversation> conversations) throws Exception Description copied from interface:CacheServiceconvert each instances in the input conversation list to conversation record stored in database- Specified by:
sync2BoundConversationsin interfaceCacheService- Parameters:
conversations-- Returns:
- Throws:
Exception
-
cacheReply
- Specified by:
cacheReplyin interfaceCacheService- Throws:
Exception
-
getRealKey
-
removeCache
Description copied from interface:CacheServiceremove the corresponding cache entry- Specified by:
removeCachein interfaceCacheService- Parameters:
conversations- the last conversation list- Throws:
Exception
-