. Net data dependency Cache

Source: Internet
Author: User

Environment
SQL version: MSSQL2005
IDE version: Visual Studio2010
OS: win7
Step 1: Find the location of asp_regsql.exe, which is generally windows \ microsoft.net \ framwork \
Step 2: Run CMD to convert the path to 1
Step 3: Enable database for SQL cache Dependencies
Aspnet_regsql-S localhost-E-d database-ed
Step 4: Enable the tablename table for the SQL cache dependency
Aspnet_regsql-S localhost-E-d database-t tablename-et
Step 5: Add the following configuration under system. web in web. config
<Caching>
<SqlCacheDependency enabled = "true">
<Databases>
<Add name = "databasename" connectionStringName = "ConnectionString is the same as the data connection configuration" pollTime = "12000"> </add>
</Databases>
</SqlCacheDependency>
</Caching>
OK, that's the process.
In this way, when the data in the tablename table of the database is changed, the cache of the program will be cleared.

 

From line 1 day

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.