mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 05:13:01 +00:00
Fix MLB manager cache method calls to use correct CacheManager methods
This commit is contained in:
@@ -161,7 +161,7 @@ class BaseMLBManager:
|
|||||||
|
|
||||||
# Try to get cached data first
|
# Try to get cached data first
|
||||||
cache_key = f"mlb_games_{datetime.now().strftime('%Y%m%d')}"
|
cache_key = f"mlb_games_{datetime.now().strftime('%Y%m%d')}"
|
||||||
cached_data = self.cache_manager.get_data('mlb', cache_key)
|
cached_data = self.cache_manager.get_cached_data(cache_key)
|
||||||
|
|
||||||
if cached_data:
|
if cached_data:
|
||||||
self.logger.info("Using cached MLB game data")
|
self.logger.info("Using cached MLB game data")
|
||||||
@@ -228,7 +228,7 @@ class BaseMLBManager:
|
|||||||
if not any(game['status'] == 'in' for game in games.values()):
|
if not any(game['status'] == 'in' for game in games.values()):
|
||||||
cache_duration = 3600 # 1 hour for non-live games
|
cache_duration = 3600 # 1 hour for non-live games
|
||||||
|
|
||||||
self.cache_manager.set_data('mlb', cache_key, games, cache_duration)
|
self.cache_manager.save_cache(cache_key, games)
|
||||||
return games
|
return games
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user