Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

requests.get() hits a stale cache without X-API-Key #23

Open
ManicJamie opened this issue Jun 27, 2023 · 1 comment
Open

requests.get() hits a stale cache without X-API-Key #23

ManicJamie opened this issue Jun 27, 2023 · 1 comment

Comments

@ManicJamie
Copy link

I have an application which gets unverified runs every minute (SRC api appears to update every 5mins), but it appears that the current raw requests.get() hits a cache and continues to fetch stale data that eg. firefox does not retrieve for around 10 minutes.

Isolated to the PHPSESSID cookie - there may be some optimisation on SRC's end that forces new sessions to hit a cache but allows existing sessions to fetch fresh data. Manually inserting the cookie from my Firefox into the headers correctly fetches fresh data.

@ManicJamie
Copy link
Author

This is also alleviated by setting X-API-Key, which is currently possible without any changes, but the fact that stale data is fetched if you don't is documented neither here nor on SRC's 7 year old docs. Could potentially store PHPSESSID to prevent this issue entirely.

@ManicJamie ManicJamie changed the title requests.get() hits a stale cache requests.get() hits a stale cache without X-API-Key Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant