Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cache jhu data (locally) for 30 minutes
  • Loading branch information
Kilo59 committed Apr 30, 2020
commit bb2ecbd6a929fbd85310abd29b18a04a4b9ae1db
4 changes: 2 additions & 2 deletions app/services/location/jhu.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ
)


@cached(cache=TTLCache(maxsize=1024, ttl=3600))
@cached(cache=TTLCache(maxsize=1024, ttl=1800))
async def get_category(category):
"""
Retrieves the data for the provided category. The data is cached for 1 hour.
Expand Down Expand Up @@ -129,7 +129,7 @@ async def get_category(category):
return results


@cached(cache=TTLCache(maxsize=1024, ttl=3600))
@cached(cache=TTLCache(maxsize=1024, ttl=1800))
async def get_locations():
"""
Retrieves the locations from the categories. The locations are cached for 1 hour.
Expand Down