-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard and chart cache refresh unexpected behaviour #30150
Comments
@calfieri, hello! I'm here to help you with any bugs, questions, or contributions. Let's work together to solve the issue you're facing. The issues you're experiencing with the cache behavior in Apache Superset can be attributed to how the system handles caching and data retrieval for dashboards and charts. Here are some insights and potential explanations for each anomaly:
Steps to Reproduce and Observations:
Potential Solutions:
Example Configuration for Cache:To configure the cache using Redis and ensure proper cache timeout settings, you can use the following configuration in FILTER_STATE_CACHE_CONFIG = {
'CACHE_TYPE': 'RedisCache',
'CACHE_DEFAULT_TIMEOUT': 86400,
'CACHE_KEY_PREFIX': 'superset_filter_cache',
'CACHE_REDIS_URL': 'redis://localhost:6379/0'
}
DATA_CACHE_CONFIG = {
"CACHE_TYPE": "RedisCache",
"CACHE_KEY_PREFIX": "superset_results",
"CACHE_DEFAULT_TIMEOUT": 86400,
'CACHE_REDIS_URL': 'redis://localhost:6379/0'
} Conclusion:Addressing these anomalies will require changes in the data retrieval and caching logic to ensure consistent behavior across different actions and formats. By ensuring that the cache is properly utilized and refreshed, you can avoid discrepancies and provide a more reliable user experience. For more detailed information on caching mechanisms and configurations, you can refer to the Superset documentation [1][2][3]. |
I'm not sure who knows the most about chart caching at this point. Maybe @villebro or @michael-s-molina know who might be able to answer this? Let's see if we can hot-potato it to success :) |
There's two things here that could be causing the issue:
Anyone feel like taking these on? 😛 |
Hi villebro; thanks a lot for your comment; if we understood correctly the behavior you describe is related to our first issue (Dashboard data don't rely on table chart cache) and of course we welcome the idea of opening a PR on this. |
Bug description
first anomaly: Dashboard data don't rely on table chart cache
the dashboard showing a data table is not getting its data from the underlying chart, but appears to get data directly on the chart dataset.
second anomaly: Dashboard file download don't rely on dashboard cache
the file download (both csv and xlsx) from a dashboard relies directly on the underlying dataset, neither on the dashboard cache nor on the chart cache.
third anomaly: chart file download (only xlsx) don't rely on chart cache
the file download (only xlsx) from a dashboard relies directly on the underlying dataset, not on the chart cache. The csv download instead appears to work correctly.
How to reproduce the bug
Screenshots/recordings
three lines interted into the dataset

After deleting third row
The dashboard remains stable, relying on the cache
excel download reports 2 rows
csv dowload reports 2 rows
the downloaded data don't meet the dashboard data
After entering the chart the dashboard appears to have refreshed with dataset data and not with chart data (cached)
Please pay attention the chart data is still presenting the cached data (aging 14 minutes):
Downloading csv from chart after few minutes:

Downloading xlsx from chart after few minutes:
download data meet the chart data
After 3 hours
chart still rely on its data cache
Downloading csv from chart:

download data meet the chart data
Downloading xlsx from chart:

download data don't meet the chart data
Superset version
3.1.3
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: