Hi everyone, first post here in the forum. I’m usually in #rubyonrails
I’ve been thinking about the various types of caching, and I was
wondering if its possible to have the server selectively send back data,
instead sending nothing ‘0’ if user has the newest data.
My example is a presence monitor, and it seems like the logic is:
- Rails caches the ‘current user’ list fragment with a timestamp.
- User requests a view that contains a periodic_updater to the current
user list (and the updater passes the timestamp in its requests back to
- the server compares it to the current timestamp on that fragment. if
its identical. send back a 0/nochange notice. otherwise send back the
newer data with its timestamp.
- now further xhr requests from client contain the updated timestamp.
I’d like to know if anyones already attempted or thought of this before.