public class CacheableInterceptor extends Object implements com.jfinal.aop.Interceptor
| 限定符和类型 | 字段和说明 |
|---|---|
private static boolean |
actionCacheEnable |
private static String |
actionCacheRefreshKey |
private static String |
actionCacheRefreshValue |
static String |
IGNORE_CACHED_ATTRS |
private static String |
NULL_VALUE |
protected static com.jfinal.render.RenderManager |
renderManager |
| 构造器和说明 |
|---|
CacheableInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
cacheActionContent(String cacheName,
String cacheKey,
int liveSeconds,
com.jfinal.aop.Invocation inv,
Method method)
对 action 内容进行缓存
|
private void |
forController(com.jfinal.aop.Invocation inv,
Method method,
Cacheable cacheable) |
private void |
forService(com.jfinal.aop.Invocation inv,
Method method,
Cacheable cacheable)
Service 层的 Cacheable 使用
|
static String |
getActionCacheRefreshKey() |
static String |
getActionCacheRefreshValue() |
private static com.jfinal.render.Render |
getControllerRender(com.jfinal.aop.Invocation inv,
Method method) |
private <M extends JbootModel> |
getCopyObject(com.jfinal.aop.Invocation inv,
Object data) |
private Set<String> |
getRequestAttrNames(javax.servlet.http.HttpServletRequest request) |
void |
intercept(com.jfinal.aop.Invocation inv) |
static boolean |
isActionCacheEnable() |
private JbootException |
newException(Exception ex,
com.jfinal.aop.Invocation inv,
Object data) |
private void |
renderActionCachedContent(com.jfinal.core.Controller controller,
ActionCachedContent actionCachedContent)
渲染缓存的 ActionCachedContent
|
static void |
setActionCacheEnable(boolean actionCacheEnable) |
static void |
setActionCacheRefreshKey(String actionCacheRefreshKey) |
static void |
setActionCacheRefreshValue(String actionCacheRefreshValue) |
private static final String NULL_VALUE
public static final String IGNORE_CACHED_ATTRS
private static boolean actionCacheEnable
private static String actionCacheRefreshKey
private static String actionCacheRefreshValue
protected static final com.jfinal.render.RenderManager renderManager
public CacheableInterceptor()
public static boolean isActionCacheEnable()
public static void setActionCacheEnable(boolean actionCacheEnable)
public static String getActionCacheRefreshKey()
public static void setActionCacheRefreshKey(String actionCacheRefreshKey)
public static String getActionCacheRefreshValue()
public static void setActionCacheRefreshValue(String actionCacheRefreshValue)
public void intercept(com.jfinal.aop.Invocation inv)
intercept 在接口中 com.jfinal.aop.Interceptorprivate void forController(com.jfinal.aop.Invocation inv, Method method, Cacheable cacheable)
public static void cacheActionContent(String cacheName, String cacheKey, int liveSeconds, com.jfinal.aop.Invocation inv, Method method)
cacheName - cacheKey - liveSeconds - inv - method - private static com.jfinal.render.Render getControllerRender(com.jfinal.aop.Invocation inv, Method method)
private void renderActionCachedContent(com.jfinal.core.Controller controller, ActionCachedContent actionCachedContent)
controller - actionCachedContent - private Set<String> getRequestAttrNames(javax.servlet.http.HttpServletRequest request)
private void forService(com.jfinal.aop.Invocation inv, Method method, Cacheable cacheable)
inv - method - cacheable - private <M extends JbootModel> Object getCopyObject(com.jfinal.aop.Invocation inv, Object data)
private JbootException newException(Exception ex, com.jfinal.aop.Invocation inv, Object data)
Copyright © 2024. All rights reserved.