Skip to content

Commit

Permalink
Merge pull request #123 from opencivicdata/bugfix/remove-request-key-…
Browse files Browse the repository at this point in the history
…override

Remove key_for_request override from LegistarEventsScraper
  • Loading branch information
antidipyramid authored Jan 5, 2024
2 parents e1f90de + 1777a89 commit 851bb7a
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions legistar/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,9 @@ def eventPages(self, since):
def should_cache_response(self, response):
# Never cache the top level events page, because that may result in
# expired .NET state values.
#
# works in concert with `key_for_request` to stop a request
# from using the cache
return (super().should_cache_response(response) and
response.url != self.EVENTSPAGE)

def key_for_request(self, method, url, params):
# avoid attempting to pull top level events page from cache by
# making sure the key for that page is None
#
# works in concert with `should_cache_response` to stop a request
# from using the cache
if url == self.EVENTSPAGE:
return None

return super().key_for_request(method, url, params)

def eventSearch(self, page, since):
payload = self.sessionSecrets(page)

Expand Down

0 comments on commit 851bb7a

Please sign in to comment.