diff --git a/files/helpers/cron.py b/files/helpers/cron.py index 590e4c2ac..16a6b8fad 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -32,7 +32,8 @@ def cron(every_5m, every_1h, every_1d, every_1mo): spin_roulette_wheel() offsitementions.offsite_mentions_task() if SITE_NAME == 'PCM': - route_static.live_cached(force=True) + cache.delete_memoized(route_static.live_cached) + route_static.live_cached() if every_1h: awards.award_timers_bots_task() diff --git a/files/routes/static.py b/files/routes/static.py index 0adf32084..f52d07bee 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -443,10 +443,8 @@ if SITE == 'pcmemes.net': live_thumb_regex = re.compile('\{"thumbnail":\{"thumbnails":\[\{"url":"(.*?)"', flags=re.A) offline_regex = re.compile('","title":"(.*?)".*?"width":48,"height":48\},\{"url":"(.*?)"', flags=re.A) - @cache.memoize(timeout=86400, - forced_update=(lambda force=False: force), - args_to_ignore=["force"]) - def live_cached(force=False): + @cache.memoize(timeout=86400) + def live_cached(): live = [] offline = [] db = db_session()