GitHub user virtualb0x created a discussion: Cache warm_up logic?

Hello.

I've turned on cache warm up via celery:
```
      beat_schedule = {
        'cache-warmup-hourly': {
                'task': 'cache-warmup',
                'schedule': crontab(minute='*/5', hour='*'),  # @hourly
                'kwargs': {'strategy_name': 'dummy'},
            },
        }
```


It runs every 5 minutes successfully. My superset charts (tables in it)  
connected to trino. 
So every 5 minutes I see successful queries to trino (as in trino UI and in 
superset logs):


```
[2025-08-25 07:00:00,104: INFO/ForkPoolWorker-31] 
cache-warmup[c8dac5a0-af4d-4ca1-8236-2f6aa9d8b971]: Scheduling {"chart_id": 926}

[2025-08-25 07:00:02,000: INFO/ForkPoolWorker-3] 
fetch_url[e36c0be9-5803-4c8c-b44d-e832f7a88ece]: Fetching 
http://superset-debug:8088/api/v1/chart/warm_up_cache with payload {"chart_id": 
926}

[2025-08-25 07:00:02,288: INFO/ForkPoolWorker-3] 
fetch_url[e36c0be9-5803-4c8c-b44d-e832f7a88ece]: Fetched 
http://superset-debug:8088/api/v1/chart/warm_up_cache with payload {"chart_id": 
926}, status code: 200

```
In trino UI i see the queries are running as superset user.

But when I login as my own user to superset, I see the data in dashboard is 
requesting from trino one more time and I have to wait all the queries are 
finished it trino again, though the cache has warmed up a minute ago.

After my first login and requesting for data it seems to be c ached and 
superset doesn't sent request queries to trino from my user for some time

Can anyone explain how exactly warmup is working? Must it return data for every 
user in system in dashboards or is it useful only for user from whom the warmup 
process is running?

My situation  seems to be close to 
https://github.com/apache/superset/issues/27160#issuecomment-2656068850

GitHub link: https://github.com/apache/superset/discussions/34837

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to