Skip to content

Commit 6603260

Browse files
authored
Merge pull request #43 from drift-labs:goldhaxx/DATA-75/add-btc-perp-to-user-retention-report
Update cache bypass parameters in user retention pages
2 parents 9525b6c + 794dec7 commit 6603260

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/page/user_retention_explorer_page.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def is_processing(result):
1212
@st.cache_data(ttl=3600) # Cache for 1 hour
1313
def get_market_list():
1414
"""Fetches the list of available markets for the dropdown."""
15-
# Add use_cache=False to bypass the backend's cache middleware for this simple, fast endpoint.
16-
return fetch_api_data(section="user-retention-explorer", path="markets", params={"use_cache": False})
15+
# The middleware expects `bypass_cache=true`, not `use_cache=False`.
16+
return fetch_api_data(section="user-retention-explorer", path="markets", params={"bypass_cache": "true"})
1717

1818
# Function to call the calculation endpoint
1919
def calculate_retention(market, start_date):

src/page/user_retention_summary_page.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def get_error_message(result):
2828
@st.cache_data(ttl=300) # Cache data for 5 minutes
2929
def load_retention_data():
3030
"""Fetches user retention summary data from the backend API, which reads from a static file."""
31-
# Add use_cache=False to bypass the backend's cache middleware for this simple, fast endpoint.
32-
data = fetch_api_data(section="user-retention-summary", path="summary", params={"use_cache": False}, retry=False)
31+
# The middleware expects `bypass_cache=true` to skip caching.
32+
data = fetch_api_data(section="user-retention-summary", path="summary", params={"bypass_cache": "true"}, retry=False)
3333
return data
3434

3535
def user_retention_summary_page():

0 commit comments

Comments
 (0)