Ticket #119 (new QA) — at Version 1
一些页面套缓存标签或多层缓存的几点建议
| Reported by: | huangjianhua | Owned by: | huangjianhua |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | 网友前台 | Version: | 6.1 |
| Keywords: | 缓存标签 多层缓存 | Cc: | |
| Due Date: | 22/10/2012 |
Description (last modified by huangjianhua) (diff)
1.指定缓存标签的缓存时间是多长;
如:
<memcached:cache time='3600' key='product_detail.jsp?${param.name}_${param.id}_${param.pid}_${param.buy}' refresh='${refreshFlag}'>
time='3600',指定1小时的MC缓存时间
2.显式在标签中加refresh参数,指定传刷新的参数;
3.套页面缓存中,切记禁用缓存块内再套另一块缓存,除非是业务特殊需求.
如: 在A页面已经套了缓存标签了,然后在A页面引用的B页面再套一层缓存标签,这时就需要注意了,B页面中的变量是否也在A页面中使用到,如果有使用到,或者是不确定是否被共享使用到了,这时候就禁用在B页面加缓存标签,因为在A,B页面同时加两层缓存标签,正常的情况下,意味着这个页面有2层缓存;异常情况下会导致变量共享的失败,数据混乱,页面出现的内容跟预想的不一致.
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/global/2008/images/jss/m_logo091125.jpg)