Jon Solow
commited on
Commit
·
a323d54
1
Parent(s):
8aa2333
Change stat cache to 1 minute
Browse files- src/pages/11_Scoreboard.py +2 -2
- src/stats.py +1 -1
src/pages/11_Scoreboard.py
CHANGED
@@ -8,7 +8,7 @@ from data_storage import get_all_users, get_all_rosters
|
|
8 |
from domain.constants import SEASON
|
9 |
from domain.playoffs import CURRENT_PLAYOFF_WEEK, PLAYOFF_WEEK_TO_NAME
|
10 |
from load_options import get_map_week_player_id_option, PlayerOption
|
11 |
-
from stats import get_stats_map, get_scores_map, get_yahoo_schedule
|
12 |
from queries.pfr.league_schedule import get_season_game_map
|
13 |
|
14 |
|
@@ -34,7 +34,7 @@ def get_daily_updated_schedule() -> dict[int, dict[str, dict[str, str | int | pd
|
|
34 |
return schedule
|
35 |
|
36 |
|
37 |
-
@st.cache_data(ttl=60 *
|
38 |
def get_schedule_with_live() -> dict[int, dict[str, dict[str, str | int | pd.Timestamp]]]:
|
39 |
schedule = get_live_schedule()
|
40 |
|
|
|
8 |
from domain.constants import SEASON
|
9 |
from domain.playoffs import CURRENT_PLAYOFF_WEEK, PLAYOFF_WEEK_TO_NAME
|
10 |
from load_options import get_map_week_player_id_option, PlayerOption
|
11 |
+
from stats import get_stats_map, get_scores_map, get_yahoo_schedule, STAT_CACHE_SECONDS
|
12 |
from queries.pfr.league_schedule import get_season_game_map
|
13 |
|
14 |
|
|
|
34 |
return schedule
|
35 |
|
36 |
|
37 |
+
@st.cache_data(ttl=60 * STAT_CACHE_SECONDS)
|
38 |
def get_schedule_with_live() -> dict[int, dict[str, dict[str, str | int | pd.Timestamp]]]:
|
39 |
schedule = get_live_schedule()
|
40 |
|
src/stats.py
CHANGED
@@ -10,7 +10,7 @@ from login import get_stat_overrides
|
|
10 |
from queries.nflverse.github_data import get_player_kicking_stats, get_player_stats, get_team_defense_stats
|
11 |
|
12 |
|
13 |
-
STAT_CACHE_SECONDS = 60
|
14 |
|
15 |
|
16 |
@dataclass
|
|
|
10 |
from queries.nflverse.github_data import get_player_kicking_stats, get_player_stats, get_team_defense_stats
|
11 |
|
12 |
|
13 |
+
STAT_CACHE_SECONDS = 60
|
14 |
|
15 |
|
16 |
@dataclass
|