Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
That is, you want to cache realtime data? - some kind of contradiction, don't you think?
That is, a person should see the realtime update, but at the same time this data should be cached. O_O
And so - you can only update the area with which the user works with ajax.
Or you can save the whole page to a file and, depending on the time, either update or issue a cache.
Or save in the database (in my opinion not a good idea)
If I understand correctly, about real-time, you mean that the user receives data from the server (no matter how: sockets, ajax, etc.) and on the server this data needs to be cached - until new ones appear?
In this case, it is necessary:
1. When fetching data that is sent in real time, check if there is an object in the cache.
2. In the place where the data is updated - overwrite the value in the cache with the new object.
Everything seems to be so standard.
Well, just like not quickly updated data, I don’t really understand what is your problem with caching them?:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question