Optimal ASP.Net caching duration for a large site?

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?

+3
source share
2 answers

I don’t think you will ever find a published formula or strict guidelines for optimizing your cache. Each situation will be radically different, and even from the number of variables you are talking about, this is not possible quantitatively.

, , , .

, , , 10%, , . - , .

+2

- , , , . , , , , . .

0

Source: https://habr.com/ru/post/1748207/


All Articles