About the caching of list contents

take Chestnut as an example. APP, pages like Today"s profile portrait are all made up of pieces of news, and each piece of news can interact with each other, such as likes and comments. Then the data on such pages must have been cached by CDN. Then my question is: for example, if I like or comment on a certain news, then although the actual data have already performed likes and comments, What if I make sure that my page is refreshed with a status that has been liked and commented on? If there is no CDN in the middle, then we may trigger to update the relevant content data. I don"t know how you are dealing with this.

Nov.19,2021

tell me about my current handling.
hierarchical caching
first of all, the news must be the main body, the content is relatively stable and will not be updated frequently, so the news list must be cached, and the caching time depends on the situation.
secondly, such as user-related data (comments and likes), these allow the client to pull the data each time, or merge it when returning the news list. The
principle is that data that remains stable can be cached, user-related, and frequently changed without caching.
I hope it will be helpful to you.


to be honest, I don't quite understand your description
, but I guess you mean that when you get the data of the news, if you go through the CDN, you will get the cached data on the CDN instead of the real-time data, right?
to mention here, CDN is usually only used to cache static resources, such as html,css,js, and the source of data is that the backend API,API does not do CDN caching. (I don't know if the CDN you're talking about is the one on the cloud server. If so, that's what I mean.)

Menu