473,473 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Selectively removing Cache Key

Hi all,
I am inserting a key in HttpContext.Cache
Some keys I am caching for multiple days. Out of these once a while I
need to reset cache entry of specific key.
I can do a lot to reset the whole cache, but I wanted to selectively
remove the entry.
Is it possible to do that?
Thanks
Tarun

Nov 19 '05 #1
4 1547
ta********@gmail.com wrote:
Hi all,
I am inserting a key in HttpContext.Cache
Some keys I am caching for multiple days. Out of these once a while I
need to reset cache entry of specific key.
I can do a lot to reset the whole cache, but I wanted to selectively
remove the entry.
Is it possible to do that?
Thanks
Tarun


The easiest way would be to add a dependency to a file, when you insert
the value into the cache. When you want to clear it, just 'touch' that
file (update it) and the cache will invalidate the variable dependent on it.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2
Cache.Remove("CacheID")

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi all,
I am inserting a key in HttpContext.Cache
Some keys I am caching for multiple days. Out of these once a while I
need to reset cache entry of specific key.
I can do a lot to reset the whole cache, but I wanted to selectively
remove the entry.
Is it possible to do that?
Thanks
Tarun


Nov 19 '05 #3
Dear Responders, thanks
Is there an "Operating System" way of removing the entry.
I could code for it and I could create Cache dependency but I don't
want to do that.
Any Win2K interface that lets you see the keys.
Thanks
Tarun

Nov 19 '05 #4
Thanks Responders.
I don't want to code and put Cache dependency.
I wanted Admin to do it with some OS interface.
Is there any Windows way of browsing the keys and remove it (like using
any tool in Control Panel)
Regards
Tarun

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jim Ley | last post by:
Hi, IE has the ability to setExpressions on stylesheets so you can calculate the value of the css property through script. For various reasons I'm wanting to use a side-effect of this to...
1
by: dejausenet | last post by:
I have firefox 1.0, running on winxp Firefox blocks popups fine, but sometimes, for selected occassions only, i would like to be able to have window popup; without enabling whole domains, as...
4
by: Guadala Harry | last post by:
I want to create a STATIC method that removes all items from the Cache. Questions: 1. Is a safe thing to do (any threading issues?) 2. Is the following code a good way to get the job done -...
10
by: Robert Jacobson | last post by:
Hi, I'm develing a COM add-in for Microsoft Word XP that displays a form. I'd like to have the form display using the Windows XP theme. However, neither using a manifest nor calling...
102
by: tom fredriksen | last post by:
Hi I was doing a simple test of the speed of a "maths" operation and when I tested it I found that removing the loop that initialises the data array for the operation caused the whole program to...
0
by: kirat.singh | last post by:
Forgive me if this has already been discussed, but it seems to me that one could reduce the memory usage of dictionaries by 2/3 by removing the precomputed hash in each bucket. Since...
1
by: Siva | last post by:
Hi, I have a 3 tier ASP.Net app for a handheld which needs to fetch orders from database via a DAL and populate it in a gridview using objectdatasource. In the search page I have a few parameters...
0
by: negmat | last post by:
Hello everyone, I have the following question: I am aware that the objects currently in the cache can be viewed by issuing the following command: SELECT * FROM master.dbo.Syscacheobjects ...
4
by: kellygreer1 | last post by:
Sometimes at the end of a project you'll end up with unused Tables, Stored Procs, Functions, and Views. Since there is not something like a 'SELECT' trigger ... what is the best way for telling...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.