给出以下测试代码,似乎ASPX应用程序将本地生成的对象放在某种缓存中。可以以任何方式控制这种行为吗?
<%
Response.Write(DateTime.Now.Ticks.ToString()+"<br>");
var ticks = System.DateTime.Now.Ticks;
var us = new UserSession("someguid"); // some custom object
var elapsedTicks = System.DateTime.Now.Ticks-ticks;
Response.Write(elapsedTicks.ToString()+"<br>");
%>
输出:
636724515667290422
156249
636724516024946218
0
636724516212444985
0
(...)
636724516744942243
156251