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 8378893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:02:06+00:00 2026-06-09T16:02:06+00:00

I have a MVC3 application that is serving views stored in a database. I

  • 0

I have a MVC3 application that is serving views stored in a database. I created a VirtualPathProvider and in my GetFile and FileExists methods I go to the database and return the correct thing. So far so good.

Now I want to cache the view I return from GetFile. I understand MVC already does some view caching and we have some control with it via GetCacheDependency method. But do we have more control than this? For example, can we use a custom cache there? In my case, I’m interested in caching the views on local filesystem and do my own cache invalidation.

An easy way would be to do it myself in my GetFile method, but if there’s a natural extensibility point for this in MVC I would rather use it instead.

Thanks

  • 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-06-09T16:02:08+00:00Added an answer on June 9, 2026 at 4:02 pm

    I was looking at something, noticed your question, has not been answered. You would need to override GetFileHash() along with GetCacheDependency(). Then you would need to implement your own CacheDependency to invalidate the ASP.NET Cache.

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

Sidebar

Related Questions

We have a MVC3 application that we have created many small actions and views
i have created an mvc3 web application that uses forms based authentication. one part
I have an existing MVC3 application and database that is on a SQL Server
I have an ASP.NET MVC3 application that uses entities generated from a database. Each
I have an MVC3 application with Razor and I created a View that inside
I'm developing an ASP MVC3 application and I have some views that are related
I have created an mvc3 application that allows my customers to have there own
I have an ASP MVC3 application that has several HttpPost ActionResult methods. During a
I have an ASP.NET MVC3 application that I have built and it has two
I have a ASP.NET MVC3 application that handles time-consuming processes (copying a large file

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.