...
|
...
|
@@ -53,6 +53,7 @@ public class SearchCacheAspect { |
|
|
SearchCache searchCache = searchCacheFactory.getAspectSearhCache(searchCacheAble);
|
|
|
boolean useJsonSerializable = searchCacheAble.cacheType().equals(CacheType.EHCACHE)?false:true;
|
|
|
Serializable cacheObject = searchCacheService.getSerializableObjectFromCache(searchCache, cacheKey, returnClass,useJsonSerializable);
|
|
|
|
|
|
if (cacheObject != null) {
|
|
|
return cacheObject;
|
|
|
}
|
...
|
...
|
@@ -83,8 +84,8 @@ public class SearchCacheAspect { |
|
|
private String getCacheKey(ProceedingJoinPoint pjp, SearchCacheAble searchCacheAble) {
|
|
|
Object[] arges = pjp.getArgs();
|
|
|
Object object = arges[0];
|
|
|
if (object instanceof SearchCacheAbleParam) {
|
|
|
return this.getCacheKey((SearchCacheAbleParam) object, searchCacheAble);
|
|
|
if (object instanceof ISearchCacheAbleParam) {
|
|
|
return this.getCacheKey((ISearchCacheAbleParam) object, searchCacheAble);
|
|
|
}
|
|
|
if (object instanceof HttpServletRequest) {
|
|
|
return this.getCacheKey((HttpServletRequest) object, searchCacheAble);
|
...
|
...
|
@@ -96,7 +97,7 @@ public class SearchCacheAspect { |
|
|
}
|
|
|
|
|
|
// 获取SearchCacheAbleParam的缓存key
|
|
|
private String getCacheKey(SearchCacheAbleParam searchCacheAbleParam, SearchCacheAble searchCacheAble) {
|
|
|
private String getCacheKey(ISearchCacheAbleParam searchCacheAbleParam, SearchCacheAble searchCacheAble) {
|
|
|
String valueString = searchCacheAbleParam.toCacheKeyValue();
|
|
|
return this.getRealCacheKey(valueString, searchCacheAble);
|
|
|
}
|
...
|
...
|
|