JiveJdon Community Forums
在线179人   首页   主题表   培训咨询   标签   查搜   注册    登陆 RSS
首页 » 论坛 » 开源JdonFramework及其应用案例论坛
???en_US.forumThreadPrev.name??? 上一主题
RSS google yahoo 365Key网摘 CSDN网摘 添加到百度搜藏 POCO网摘 新浪ViVi QQ网摘
???en_US.forumThreadNext.name??? 下一主题
Go 共有 0 回复(1页) 阅读50次
 发表新帖子   回复该主题贴
蓝色虾



发表文章:
注册时间: 2002年09月29日
悄悄话
个人博客
在线? 当前离线
我要关注该作者发言
关于JDONJIVE中DbFilterManager中代码的疑问 2003年07月08日 18:32 收藏关注本主题 到本帖网址 加入本帖到收藏夹 请用鼠标选择需要回复的文字再点按本回复键 回复该主题
标签
代码如下:


String filterContext = context + "filter" + i + ".";
String className = properties.getProperty(filterContext +
"className");
filters[i] = (ForumMessageFilter) Class.forName(className).newInstance();
// If this filter isn't cacheable, then no further filters can
// be cached.
if (!filters[i].isCacheable()) {
uncacheableIndex = i;
}


if (!filters.isCacheable()) {
uncacheableIndex = i;
}
的作用按照注释所说当遇见不能cache的filter后,剩下的filter过滤的结果均不能被cache,可是这里有个疑问,如果fiters[]中出现了多个不能cache的filter,按照程序中,uncacheableIndex将定位在最后一个不能cache的filter上,那么在其之前的不能cacahe的filter不是被cache了吗?

例如:

filter1 -->filter2(不能cache) -->filter3 -->filter4(不能cache) -->filter5 -->filter6

程序因该从第二个filter开始就不能cache结果,可是找源代码中的话,程序将从第四个filter开始不cache。

是不是改为:
if (!filters.isCacheable() && uncacheableIndex == -1) {
uncacheableIndex = i;
}
标签
共有 0 回复(1页) Go
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表    返回页首返回页首
???en_US.forumThreadNext.name??? 下一主题
正在读取,请等待...
查询本论坛内 回复超过的热门帖子
标题
 
粗体: [b]文本[/b] 斜体: [i]文本[/i] 下划线 [u]文本[/u] 插入网上的图片 [img]http://wwww.xxxx.com/img.ext[/img] 插入代码 [code]程序代码[/code]  插入url链接 [url]http://url[/url] / [url=http://url]URL加下滑线[/url] 上传图片 word文档 Txt等附件
内容
  提交时自动拷贝以上内容到剪贴板 Ctrl+V可取出;提问题前先查询标签列表

使用帮助 手机m.jdon.com RSS add to google add to yahoo
解惑之道在J道 ,打造中国最具影响力的的软件架构社区 推荐FireFox或Chrome快速浏览本站
OpenSource JIVEJDON Powered by JdonFramework Code © 2002-10 jdon.com

anti spam