Skip to content

Commit

Permalink
Cache URLs with ? too
Browse files Browse the repository at this point in the history
  • Loading branch information
copelco committed Oct 30, 2024
1 parent 1995e2d commit fddaa74
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nc/prime_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def get_group_urls(agency_id: int, officer_id: int = None) -> list[str]:
if officer_id:
url += f"?officer={officer_id}"
urls.append(host + url)
# Add a URL with a trailing ? to ensure the cache is primed
# since React sometimes appends it to the URL
if not officer_id:
urls.append(host + url + "?")
return urls


Expand Down

0 comments on commit fddaa74

Please sign in to comment.