文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>session state inproc optimization

session state inproc optimization

时间:2010-09-13  来源:搂着鱼睡的猫

If we are in InProc mode, and cookieless=false,in certain scenarios we can avoid reading the session ID from cookies because that's an expensive operation.To allow that,we use s_sessionEverSet to keep track of whether we've ever created any session state.

If no session has ever be created,we can optimize in the following two cases:

Case 1: Page has disabled session state

In BeginAcqurieState, we usually read the session ID, and reset the timeout value of the session state. However, since no session has been created, we can skip both reading the session id and resetting the timeout.

Case 2: Page has enabled session state

In this case, we will delay reading(and creating it if not found) the session ID until it’s really needed.(e.g. from HttpSessionStateContainer.SessionID)

Please not that SessionStateModule optimizes only if the application is using SessionIDManager as the session ID provider; otherwise, we do not have knowledge about the provider in order to optimize safely.

And we will delay reading the id only if we are using cookie to store the session ID. If we use cookieless, in the delayed session ID creation scenario, cookieless requires a redirect, and it’ll be bad to do that in the middle of a page execution.

相关阅读 更多 +
排行榜 更多 +
空中跑酷汉化版

空中跑酷汉化版

赛车竞速 下载
修仙传说

修仙传说

角色扮演 下载
魔界零之迷宫

魔界零之迷宫

冒险解谜 下载