How does the page cache of the article on habré?

0 like 0 dislike
30 views
As a sample of comments to articles (and updating) works so fast?

I have these options:
1) Reverse proxy server will cache the entire page content articles along with comments, after adding a new comment page cache is reset
2) More likely option — review the cache is stored in memory on back-end server, requests for the article and the comments to it are broadcast directly to it
3) Another option is to store everything in the database and is selected anew each time

Please clarify if anyone knows. Interested in how to achieve such speed in the tree display of comments
by | 30 views

3 Answers

0 like 0 dislike
The entire page is usually not cacheroot, you never know which plugin will be added later, which will require frequent updates. Although in such situations, good double render. The result of the first render cached (post, comments), and the second is always active (personal data, sidebar).
\r
Cache can all post comments in one sheet (post.id -> HTML), dropping in new posts. To draw comments it is not difficult.
by
0 like 0 dislike
And what's the problem? When you use a review based on materialized path all the comments you can select a single query on the indexes and then converted to the tree in the output.
I think that comment is just not cached here.
by
0 like 0 dislike
So wave loads have usually only on the articles on the main. The peak then decreases.
To cache into RAM comments for 10 articles is not a problem.
Still, Habr not Facebook some.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
7 answers
0 like 0 dislike
1 answer
asked May 2, 2019 by BelCoder
110,608 questions
257,187 answers
0 comments
40,796 users