Pages: 1 :: [one page] |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
CSH WhiteKnight
Gallente Pat Sharp's Potato Rodeo Wildly Inappropriate.
|
Posted - 2008.10.14 20:35:00 -
[1]
I`m writing a site that gives our corp members information about our assets. (Trusted members only obviously)
To get this information i`m intending to use the API page "/corp/AssetList.xml.aspx" to list all the corp assets, and then do some post processing. However from the documentation i can find, it appears this page is cached for 23hrs.
This isnt too much of a problem, however my question is this. Is this cache "per corp" or "per api key".
By that i mean If another director queries the asset data within the 23hrs, will they get "old" cached data or will it go and get fresh data for them (and then cache it for 23 hrs).
Same question applies to all the other caches i guess, but this is the only one thats really a problem due to its huge timeout period.
Anyone know the answer ?
|
Mulasha Sinae
Amarr Kismet Foundation Exxxotic
|
Posted - 2008.10.14 20:46:00 -
[2]
As far as I know, it's per IP address, although I've only tested it on a per-API Key basis. And even so, if you have a cache for it, you can just have it so it queries it once every 23 hours, regardless of the API key used.
Hell, you can even use your own API key for the whole thing and just give specific people access with a password, although giving the trusted people the proper roles for the response would probably be more secure.
|
Ambo
State Protectorate
|
Posted - 2008.10.14 21:02:00 -
[3]
I believe it's cached per account (possibly per char?).
I've also certainly experienced caching across different IP addresses for the same account/char before.
I've never been in a position to test caching across multiple accounts that all have acess to corp data but I suspect the cache will not be shared... pretty easy to test if you really need to know though. --------------------------------------
Trader? Investor? Just want to track your finances? Check out EMMA |
CSH WhiteKnight
Gallente Pat Sharp's Potato Rodeo Wildly Inappropriate.
|
Posted - 2008.10.14 21:09:00 -
[4]
Originally by: Mulasha Sinae As far as I know, it's per IP address, although I've only tested it on a per-API Key basis. And even so, if you have a cache for it, you can just have it so it queries it once every 23 hours, regardless of the API key used.
Hell, you can even use your own API key for the whole thing and just give specific people access with a password, although giving the trusted people the proper roles for the response would probably be more secure.
THe problem is not accessing the data, its the fact that some people will want "up to date" information on their personal API apps, so if it was "per corp" then it would be a bit of an issue, as this will be polling every 23hrs, thus locking all the other directors out from having "current" data for the next day. If its per API, Account or IP, its not a problem.
|
CSH WhiteKnight
Gallente Pat Sharp's Potato Rodeo Wildly Inappropriate.
|
Posted - 2008.10.14 21:10:00 -
[5]
Originally by: Ambo pretty easy to test if you really need to know though.
True, just easier to ask if someone has already done it :)
|
Dragonaire
Caldari Corax.
|
Posted - 2008.10.18 18:53:00 -
[6]
From what I've seen using the transactions and journal APIs CCP cache the results on the first query you make on any of the them and then just returns that result until first query after the cache until time where they repeat the cycle. For example I request the journal for the master wallet then a couple minutes later one of the other wallets the cache until time from both are the same so they seem to be pulling all of them at the same time then just return the one you ask for figuring you'll want the others next. It would make sense that even across different eve account for same corp they would use the same results and not run a fresh query for something they already have. Know on mysql server with query caching on it doesn't care where the query came from as long as its the same it will use the result it already has until some change to the DB make cache invalid or the cache expires etc. I would expect all types of DBs to do the same thing. I seem to remember a Dev Blog or forum post where they said they were changing all the caches to use the same system just with the different lengths. Hope that helps answer you questions but wouldn't be bad idea for someone to do a quick test from different IPs with two different API keys to see if that is how it work or maybe we can get an answer on this from someone at CCP. -- Finds camping stations from the inside much easier. Been known to write some PHP code for API from time to time too. |
Ambo
State Protectorate
|
Posted - 2008.10.19 06:20:00 -
[7]
Originally by: Dragonaire From what I've seen using the transactions and journal APIs CCP cache the results on the first query you make on any of the them and then just returns that result until first query after the cache until time where they repeat the cycle. For example I request the journal for the master wallet then a couple minutes later one of the other wallets the cache until time from both are the same so they seem to be pulling all of them at the same time then just return the one you ask for figuring you'll want the others next. It would make sense that even across different eve account for same corp they would use the same results and not run a fresh query for something they already have. Know on mysql server with query caching on it doesn't care where the query came from as long as its the same it will use the result it already has until some change to the DB make cache invalid or the cache expires etc. I would expect all types of DBs to do the same thing. I seem to remember a Dev Blog or forum post where they said they were changing all the caches to use the same system just with the different lengths. Hope that helps answer you questions but wouldn't be bad idea for someone to do a quick test from different IPs with two different API keys to see if that is how it work or maybe we can get an answer on this from someone at CCP.
arg! my eyes! --------------------------------------
Trader? Investor? Just want to track your finances? Check out EMMA |
Jethro Jechonias
Ki Tech Industries
|
Posted - 2008.10.20 15:24:00 -
[8]
Originally by: CSH WhiteKnight Is this cache "per corp" or "per api key".
Corp data is cached per corp. The access timer is per account.
For example:
1) CEO pulls corp membership. 2) New player joins corp. 3) Director pulls corp membership.
If the director pulls the corp membership within ~6 hours of the CEO, the new player will not be listed in the corp membership.
Each API has a different cache length. You should never assume that the data you are getting is completely up-to-date, even when using character API's.
Many of the API's contain time data that can be used as a hint for judging how stale the data is. For example, the Wallet API's cannot be more stale than the last transaction, and the Corp Membership API cannot be more stale than the last logon/logoff/started time stamp.
|
Dragonaire
Caldari Corax.
|
Posted - 2008.10.22 17:27:00 -
[9]
So from what Jethro said using multiple characters in same corp doesn't get you any newer data and is just a waste of time and bandwidth which is what I thought but good to know I was right :) -- Finds camping stations from the inside much easier. Been known to write some PHP code for API from time to time too. |
|
|
|
Pages: 1 :: [one page] |