Skip to content

Commit

Permalink
Use Cache-Control headers from Wikidata
Browse files Browse the repository at this point in the history
The default without this seemed to be that data never expired, so we
never got fresh data.
  • Loading branch information
dseomn committed Oct 24, 2023
1 parent fe74480 commit 193c705
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rock_paper_sand/wikidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def requests_session() -> Generator[requests.Session, None, None]:
"""Returns a context manager for a session for Wikidata APIs."""
with requests_cache.CachedSession(
**network.requests_cache_defaults(),
cache_control=True,
) as session:
network.configure_session(session)
yield session
Expand Down

0 comments on commit 193c705

Please sign in to comment.