Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving expiration time for cached items #7

Open
EricE opened this issue Mar 2, 2015 · 6 comments
Open

Retrieving expiration time for cached items #7

EricE opened this issue Mar 2, 2015 · 6 comments
Assignees
Milestone

Comments

@EricE
Copy link

EricE commented Mar 2, 2015

Hi,
I'm trying to pull market orders periodically and want to set the minimum period to the cache time. I know it is 300 s and see where you pull it from the headers. At the application level is there a way to retrieve the cache expiration time or cache duration?

I'm following your examples at Read the Docs, I'd like to get caching data for:

sell_items = region().marketSellOrders(type=item)

Thanks!

@Dreae Dreae self-assigned this Apr 15, 2015
@Dreae
Copy link
Collaborator

Dreae commented Apr 15, 2015

There is not currently convenient way to get the cache time for resources, when I get a chance I'll see about providing that information in the APIObject returned.

@Kyria
Copy link
Contributor

Kyria commented Jun 18, 2015

Hello,

I'm wondering if there are any news about this subject ?

Generally, it would be even more interesting to have a conveniant way to get access to all headers for resources, as there are expiration time (or cache duration), x-deprecated header etc.

@wtfrank
Copy link
Contributor

wtfrank commented Jun 9, 2016

Yeah this is quite a desirable feature - I see there are two different pull requests in the queue at the moment which address the issue of cache expiry.

@jonobrien
Copy link
Contributor

jonobrien commented Jun 30, 2016

quite desirable, as endpoints have a separate cache timer, also should be versioned (#17?) as well.

edit: clarifying

@hkraal
Copy link
Contributor

hkraal commented Jul 13, 2016

When I got the build fixed and ironed out in #28 I will take a look at this as I'm planning on refactoring the caching mechanism anyways for #30.

There is indeed more info which could be sent back to the consumer, I think it would be nice to see if it's possible to add more info.

  • cache (Boolean): If the content is being served from cache
  • expiration (int): Time in seconds untill the cache expires
  • api_version (str): API version header string (e.g. "application/vnd.ccp.eve.Api-v3+json")
  • deprecated (Boolean): True if the endpoint is called with an older version (would imply that you can specify this per endpoint)

any suggestions on the names is more then welcome

@hkraal hkraal added this to the v0.1.0 milestone Jul 25, 2016
@hkraal
Copy link
Contributor

hkraal commented Jul 27, 2016

@Kyria this feature is pending in #39 , what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants