1

I use asp.net 4 c# and Output Caching.

I have a simple CMS, the homepage take a while to load 2,47 seconds latency and I found out that I can boost its performance to 0,67 seconds latency using Output Caching.

The homepage contains a list of recent articles and news, these contents are usually updated once a day, and it is not really important they are updates as soon as the new content have been published.

At the moment I use expiration time for Output Caching to 600 seconds, but I was thinking to increase this value to 6000 seconds.

Content pages are quite static and the expiration time for Output Caching to 600 seconds

I'm afraid that a high values of expiration could create a bottleneck in my application (let s imagine a scenario where I have to keep in memory cache for many pages for long time).

Could you provide me your opinion on and if is possible your advice on a "general setting" for a similar scenario?

Probably I missed some concept so I0m note able to answer my questions.

Thanks for your time.

GibboK
  • 71,848
  • 143
  • 435
  • 658
  • 3
    Every application had a different architecture and different caching needs. There is no "typical" apart from the defaults. – Oded Nov 24 '11 at 14:24
  • Oded you are right, I understand you point, just I would like have an opinion about the "bottleneck" possible problem, and a very general feedback on my settings. – GibboK Nov 24 '11 at 14:25
  • 2
    Without exact knowledge of how much ram you have, the size of a typical cache entry, how many entries you expect (as a function of time), it is impossible to estimate. – Oded Nov 24 '11 at 14:27
  • 1
    In addition, the logner you cache the less the gain. As in: caching 1 minute means one request every mionute which may be instead of 100 per second. That is a gain of factor 6000. Caching one hour only means 1/60th of the requests (one per minute). I dont think more than 5 minutes makes sense in most cases. – TomTom Nov 24 '11 at 14:27
  • THAT SAID: 2.47 is SLOW for a CMS. THe alst I wrote had this (with article list etc.) without caching in less than 0.05 seconds. SOMETHING is bad here- I suggest adding a profiler and finding the bottleneck. – TomTom Nov 24 '11 at 14:28
  • I'm beginner, you gave me good point to think about. How to measure a typical cache entry? – GibboK Nov 24 '11 at 14:29
  • Thanks TomTom, 0.05 seconds seems a really fast result to me. I'm sure it also depend on hardware and architecture. – GibboK Nov 24 '11 at 14:32
  • 1
    http://stackoverflow.com/questions/1128315/find-size-of-object-instance-in-bytes-in-c-sharp – Oded Nov 24 '11 at 14:36

0 Answers0