2

Our web application has a few very large objects, which we load into a cache from the database.

Our current strategy is fine... provided you're not the user who triggers the cache load. In which case were talking 5 - 10 seconds additional load time which is unacceptable.

At present we fetch these object every ~10 minutes.

What are the standard solutions to solving this issue at current I have the following two ideas.

  1. Have an independent service that reloads the cache items when they expire.

  2. Cache the object indefinitely, always serve the last cached object but updating the cached object in a septate thread at some expiry time. (this is quite risky though as the object might be out of date)

Also we are using, ASP.NET MVC, Postgre SQL and App Fabric, although I would expect this shouldn't matter too much as this is quite theoretical.

jps
  • 1,060
  • 12
  • 19

0 Answers0