I am using the following method for removing HttpRuntime Cache:


But some times this code is not working.
Any kind of help will be appreciated.

Recommended Answers

All 3 Replies

Member Avatar

Unable to Remove HttpRuntime Cache

The issue is that your key was not specify.

You can used this:

Cache.Remove Method

This is an example

class YourCache{
    static void Main(){

    // add an item to the cache
     HttpRuntime.Cache["Key"] = "Keybar";

    // remove the item from the cache

I think LastMitch is right as your “Key” is not specified properly. Please specify your key within the code LastMitch has suggested.

Right! That will be Ok for your code it will run properly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.