Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6959547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:17:10+00:00 2026-05-27T15:17:10+00:00

i have an application that cache pages with output cache directive of asp.net. When

  • 0

i have an application that cache pages with output cache directive of asp.net.
When i insert update or delete somthing from the control panel i want to reset the output cache.
Locally my algorithm works great.
When i run it on share host, cache doesn’t clear.

my algorithm is very straight forward :
In global.asax i init a list with all the pages that i use output cache.

OutputCacheHelper.Directories.Add(OutputCacheHelper.AllPagesKey, new List<string>() {
         "/Default.aspx",
       "/pages/DisplayContactForm.aspx",
       "/pages/PhotosGallery.aspx",
       "/pages/Schedule.aspx",
       "/pages/Shows.aspx",
       "/pages/cms/DisplayCategory.aspx",
       "/pages/cms/DisplayCategoryAlternative.aspx",
       "/pages/cms/DisplayFrontPage.aspx",
       "/pages/cms/ViewAirstaff.aspx",
       "/pages/cms/ViewArticle.aspx",
       "/pages/cms/ViewShow.aspx"
});

Then whenever i insert/update/delete data from the database i use the above algorithm :

        foreach (string directory in Directories[AllPagesKey])
        {

            HttpResponse.RemoveOutputCacheItem(directory);
        }

I don’t know why this don’t work on shared hosting.
Please help.
Thank you and sorry for my english.


EDIT

Sorry for the delay.
I was on a business trip.

I figure it out…
Not as i want but i can apply only output cache.
(because Azure is not available)
I add a dependance on a file and then when i want to clear the cache, i just chage the content.
Is it ok?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:17:11+00:00Added an answer on May 27, 2026 at 3:17 pm

    Your shared hosting is a single server or a server farm (like AZURE)?
    Cache is a server-level, so in a multi-instance context, clearing cache on an istance doesn’t effect cache on other servers.

    EDIT
    In multi-server context you can:
    -use shared cache (AZURE provides it but it costs money)
    –create a system that manages cache (ie use a DB table to store last update time for each object, so that any server before look into cache knoes if it has to be resetted)
    –avoid using cache

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The context I have an Asp .Net web application with some pages that inherit
Have some strange behaviour regarding output caching in an ASP.NET 4 application on IIS
I have an application that serves artifacts from files (pages from PDF files as
I have set in my mastersite of my asp.net application the following that the
I have an application that prints text and images to pages on a printer.
I have an administrative page in a web application that resets the cache, but
I have an application that uses the application cache to store the responses generated
I have an ASP.NET MVC 3 (Razor) Web Application, with a particular page which
I have to maintain an old asp.net application, and need to disable all access
I have an ASP.Net site that streams back a PDF document after a postback

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.