<%@ Page Language="C#" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<% string content = this.Cache["Content"] as string;
if( content == null ) {
Response.Write(@"Loaded in the cache.<br/>");
content = System.IO.File.ReadAllText( @"D:\Temp\Test.txt" );
CacheDependency dep = new CacheDependency( @"D:\Temp\Test.txt" );
Context.Cache.Insert( "Content", content, dep );
}
Response.Write( @"Content of the file D:\Temp\Test.txt:" + content );
%>
</body>
</html>