I read a lot of material on how to do ASP.Net caching, but not much on the optimal duration for which pages should be cached.
Say I have a popular site with 50,000 pages. Content doesn't change often, so I could cache pages for up to an hour if I wanted. The server has 16 GB of RAM, but database connections are limited.
How long should pages be cached?
My thinking is that if I set the cache for too long (say 60 minutes), I replenish the memory by a fraction of the total content that will be constantly shuffled and exited.
In addition, we say that 10% of the pages are responsible for 90% of the traffic. If popular pages hit every second, and unpopular pages every hour, then a 60-second cache will only store downloaded content without sacrificing freshness.
Should multiple, but rarely available content be cached?
source
share