open All Channels
seplocked EVE Technology Lab
blankseplocked Caching api calls
 
This thread is older than 90 days and has been locked due to inactivity.


 
Author Topic

Aureus
Posted - 2011.04.15 14:25:00 - [1]
 

Hi all,I am new to the EVE api, am really exciting about coding my own tools which will allow me to conquer the game! muahaha!

erm, anyway... what exactly is the expected etiquette for doing api calls against EVE in terms of caching?

if I understand the instructions correctly, each api call sends you a timestamp you made the call and a date "cacheduntil" for how long this data is cached. Does this mean that I should not query the api again until that cacheduntil data passes?

If so, sounds like I need a table for each api call I intend to use, to cache the data locally to my db with a column for how long that data is cached and then I need to create some adapter which lives between my UI screens and the actual api calls to EVE, which first checks my local db to see if the data is still cached- if so just fetch the data in my local db, otherwise I may make a new api call to eve, update the data in my local cache, and then send that data back to my UI which initiated the request.

This sounds right or did I completely misunderstand something?

Admiral Stevenson33
Posted - 2011.04.15 15:27:00 - [2]
 

Yep, that about sums it up.

You'll be much better off using one of the many existing API libraries rather than writing your own though. If you're doing something web-based I recommend Yapeal.

Hel O'Ween
Men On A Mission
EVE Trade Consortium
Posted - 2011.04.15 15:34:00 - [3]
 

Originally by: Aureus
This sounds right or did I completely misunderstand something?


You perfectly understood how the caching mechanism works.

If you query the API too soon, you're either feed with the last result from the API or some error message along the line of "xxx exhausted, retry after <date/time>."

If you're going to build a tool that you'd like to share, the way you described it (your app handles the cache files locally) is the way to go. If you're "just" building a tool for your own needs, you may be lazy and omit the caching part, but use one of the available API proxies instead. (Sorry, no link at hand try eve-search.com to find one).


 

This thread is older than 90 days and has been locked due to inactivity.


 


The new forums are live

Please adjust your bookmarks to https://forums.eveonline.com

These forums are archived and read-only