[DONE] Cache time

Added by barbaros over 9 years ago

Adding the time of cache would allow precise calculations.

Like an additional unix timestamp:

<ryzom_time cache="1234567890">
  <server_tick>1273602441</server_tick>
  ...
</ryzom_time>

<character cache="1234567890">
  ...
</character>


Replies (8)

RE: Cache time - Added by vl over 9 years ago

There's now cache time on some API.
By the way, you cannot use it for tick computing because the cache time and tick is not made at the same time and can introduce some errors.

RE: [DONE] Cache time - Added by nimetu over 9 years ago

cache/expire time is currently misleading and seems to be current time and not the time xml was generated in server from user data.

same for server tick. from my personal experience with arispotle 'tick', time between 'sync' can be hours (or days even) before computed (from last sync) and actual tick start to deviate too much. ofcourse sync is neccessary after server reboot.
so, exact time tick was taken, would be extremely useful

RE: [DONE] Cache time - Added by vl over 9 years ago

cache/expire time is currently misleading and seems to be current time and not the time xml was generated in server from user data.

It's because currently the cache is off, so it's the current time :) and it's the time xml was generated.

same for server tick. from my personal experience with arispotle 'tick', time between 'sync' can be hours (or days even) before computed (from last sync) and actual tick start to deviate too much. ofcourse sync is neccessary after server reboot.
so, exact time tick was taken, would be extremely useful

Sadly, We cannot have a better association between the tick and the real live time due to the system. But anyway, the tick is only to display the time in a website, it doesn't have to be the exact in game time, just an indication.

RE: [DONE] Cache time - Added by barbaros about 9 years ago

Cache time still seems strange. It is not based on the real data/source that the xml is based on.

RE: [DONE] Cache time - Added by barbaros about 9 years ago

Could not edit my last post.

I know that the xml cache is currently disabled.
But the "cache created" attribute should only change if the actual data (taken from ryzom server/database) was updated, while "cache expire" should be the time when xml will be recreated.

RE: [DONE] Cache time - Added by vl about 9 years ago

Since the cache is disable, we get the actual data each time you request the data so the "cache created" is when we get the data.
Btw, the cache will be on very soon.

RE: [DONE] Cache time - Added by SignpostMarv about 9 years ago

I'm wondering why this was added instead of using HTTP headers to announce the cache time (last modified, if-modified-since, etc.)

RE: [DONE] Cache time - Added by LupusMichaelis about 9 years ago

I guess it'll lead to debug madness, and because it break the semantic of these HTTP parameters. It is to the client to be nice, and if it isn't, the server must be able to detect it and ban it.

(1-8/8)