注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

天上人间*bobo之家

有阳光的时段,就有他(她)的博客文章。也许天气并非晴空万里,博主的“博物钟”却是

 
 
 

日志

 
 

cache  

2010-01-20 17:30:06|  分类: typo3 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

http://typo3.org/development/articles/the-mysteries-of-chash/

However developers want to use GET variables in their plugins which are not ignored by TYPO3s caching mechanism. For example a plugin found on page 566 might want to use the parameters “?id=566&tx_myext[uid]=44” to display the full news article #44 while the main page “?id=566” displays the overview. But because the GET variable “tx_myext[uid]” is completely unknown to the TYPO3 core the page will be cached only based on the page id – which is not good enough if you have more than one news article!  

There can be three solutions to this problem: 

  1. &no_cache=1 (slow): Each link involving more parameters than the &id must contain “&no_cache=1” in addition, effectively disabling caching of the whole page. In this way it is safe to create custom content based on GET variables but the performance is poor since no caching is applied.URL Examples:

  2. USER_INT (medium): Make the plugin a USER_INT type. In this way the page is cached only one time with a placeholder which is substituted by the content of the plugin being run dynamically on each request. This caches the static parts of a page but still involves the overhead of processing the plugin.

    With this solutions “?id=566” will be picked up for caching by the system while “&tx_myext[uid]=44” will be used dynamically in the plugin thus taking effect on the final output.

    This solution is the most flexible because you don't have to worry about caching and parameters. Recommended for realtime and user customized content such as search plugins, booking forms, user setting pages etc.

    URL Examples:

  3. &cHash (fast): Each link involving more parameters than the &id must contain “&cHash=[hash string]” in addition. The value of “&cHash” is used on the server to verify that the combination of additional parameters is made by the server itself and not forged by an outside spammer.URL Examples:

  评论这张
 
阅读(46)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018