4

I'm going to cache some RSS data from other websites to my server and update caches every 10 minutes. Should I use Asp.net system.web.caching or cache in database or file?

P.S: when a user requests a feed on my client application, my server downloads it from server. And in the next 10 minutes, if another user requests that feed, my server loads it from cache. There may be for than 100 feeds...

1 Answer 1

4

The reason to go with custom database cache are:

  1. More control on how and when the cache expire
  2. The data are too many (more than 10Mg) *
  3. Need to keep them for too much time (days or months) *
  4. Access to the cache data on code behind (for any reason)

In your case, you only need to expire it soon, I think the data are small (less than 10Mg) and you keep it for 10 minutes, so go with asp.net cache that is faster because is lives in the core of the iis, and replays with out go to your code at all.

[*] I say that because the asp.net cache are keeped on the memory, but your custom cache are saved on database, so can live there for longer time, and can be huge.

Sign up to request clarification or add additional context in comments.

7 Comments

How many megabytes of data is good for Asp.net caching? (at maximum)
@Mahdi This is depend from what you have set on the pool memory limits. I think that the pool set this limits. When you set data on cache is not always go to the real memory, they can saved on virtual memory of the pool, that I mean are transfer to the disk.
@Mahdi If you place many data on the asp.net cache you start see (using process explorer) the used memory of your pools to start grow :) If its stable (not grow any more) after some minute/hours of work, then all is ok...
How to determinate how much memory is used by asp.net cache on a shared hosting server? (since it is shared hosting, I can't see the task manager)
You said for accessing cache from code behind, I have to use database, but I'm asking about system.Web.caching.cache , which is accessible from code behind...
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.