Mar 24 2008

Want to enable .NET caching from a prompt?

Here’s the command to issue at a command prompt to enable database caching for a MS SQL 2005 server:

aspnet_regsql -S [servername] -U [username] -d [databasename] -ed -et -t [tablename]

Here’s some variables to throw into your Page Directives:

<%@ OutputCache Duration=”20″ VaryByParam=”none” VaryByCustom=”browser” SqlDependency=”CommandNotification” %>