Click here to Skip to main content
16,012,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to perform SQL Cache Dependencies in asp.net 3.5
Posted

1 solution

hey i just giving a initial idea, try it..

use following namespace for

C#
using System.Web.Caching;

string[] sDependencies = new string[1];
sDependencies[0] = "key_original";
CacheDependency dependency = new CacheDependency(null, sDependencies);
Cache.Insert("key_dependent", "This item depends on OriginalItem", dependency);


or have one more..
C#
Cache.Insert("Key", value, new CacheDependency (Server.MapPath("~/myConfig.xml")));
 
Share this answer
 
v2
Comments
Ankur\m/ 14-Mar-11 2:23am    
Use PRE tags (Code block) to surround any code snippet. Makes the code more readable.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900