Skip to content

Commit 578b60e

Browse files
committed
revert to 1 hour cache
1 parent a9816e9 commit 578b60e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/services/location/csbs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ
3535
BASE_URL = "https://facts.csbs.org/covid-19/covid19_county.csv"
3636

3737

38-
@cached(cache=TTLCache(maxsize=1, ttl=1800))
38+
@cached(cache=TTLCache(maxsize=1, ttl=3600))
3939
async def get_locations():
4040
"""
4141
Retrieves county locations; locations are cached for 1 hour

app/services/location/jhu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ
4444
BASE_URL = "https://raw.githubusercontent.com/CSSEGISandData/2019-nCoV/master/csse_covid_19_data/csse_covid_19_time_series/"
4545

4646

47-
@cached(cache=TTLCache(maxsize=4, ttl=1800))
47+
@cached(cache=TTLCache(maxsize=4, ttl=3600))
4848
async def get_category(category):
4949
"""
5050
Retrieves the data for the provided category. The data is cached for 30 minutes locally, 1 hour via shared Redis.
@@ -127,7 +127,7 @@ async def get_category(category):
127127
return results
128128

129129

130-
@cached(cache=TTLCache(maxsize=1, ttl=1800))
130+
@cached(cache=TTLCache(maxsize=1, ttl=3600))
131131
async def get_locations():
132132
"""
133133
Retrieves the locations from the categories. The locations are cached for 1 hour.

app/services/location/nyt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get_grouped_locations_dict(data):
6767
return grouped_locations
6868

6969

70-
@cached(cache=TTLCache(maxsize=1, ttl=1800))
70+
@cached(cache=TTLCache(maxsize=1, ttl=3600))
7171
async def get_locations():
7272
"""
7373
Returns a list containing parsed NYT data by US county. The data is cached for 1 hour.

0 commit comments

Comments
 (0)