/**
* After the cache body, either update the cache, serve new cached content
* or indicate an error.
*
* @return The standard BodyTag return.
* @throws JspTagException
* The standard exception thrown.
*/
@Override
public int doAfterBody() throws JspTagException {
String body = null;
try {
// if we have a body, and we have not been told to use the cached
// version
if ((bodyContent != null) && ((body = bodyContent.getString()) != null)) {
Cache cache = legendCacheManager.getCache(cacheName);
cache.put(generateKey(), body);
bodyContent.clearBody();
bodyContent.write(body);
bodyContent.writeOut(bodyContent.getEnclosingWriter());
}
} catch (java.io.IOException e) {
throw new JspTagException("IO Error: " + e.getMessage());
}
return SKIP_BODY;
}
CacheTag.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:gomall.la
作者:
评论列表
文章目录