Skip to content
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

Per slice cache timeouts not honored in 0.11.0 #1325

Closed
plumbeo opened this issue Oct 12, 2016 · 3 comments
Closed

Per slice cache timeouts not honored in 0.11.0 #1325

plumbeo opened this issue Oct 12, 2016 · 3 comments

Comments

@plumbeo
Copy link
Contributor

plumbeo commented Oct 12, 2016

We're using caravel on Ubuntu 14.04, in a python 2.7 virtualenv, and we set up a redis cache in caravel 0.10.0 with this configuration:

CACHE_DEFAULT_TIMEOUT = 3600
CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_KEY_PREFIX': 'caravel_',
'CACHE_DEFAULT_TIMEOUT': 3600,
'CACHE_REDIS_HOST': 'localhost',
'CACHE_REDIS_PORT': 6379,
'CACHE_REDIS_DB': 1,
'CACHE_REDIS_URL': 'redis://localhost:6379/1'
}

Then we overrode the default timeout for specific tables and slices using the "Cache timeout" parameter available in the edit view and everything behaved as expected: the slices used the slice-specific timeout if it was set, the table-specific timeout if that one was set and the slice-specific timeout wasn't, or the default timeout if nothing else was set.

After the upgrade to 0.11.0 this stopped working, and looking to the debug logs it looks like the default timeout is always used, no matter what is set in the tables'/slices' properties:

2016-10-12 11:44:29,148:INFO:werkzeug:192.168.9.108 - - [12/Oct/2016 11:44:29] "GET /caravel/queries/1475666190833 HTTP/1.1" 200 -
2016-10-12 11:44:29,294:INFO:root:Caching for the next 3600 seconds

UPDATE: after further testing, I have to correct the report: the per-table timeout correctly overrides the default caravel timeout, it's only the per-slice timeout that is ignored.

@xrmx
Copy link
Contributor

xrmx commented Oct 12, 2016

The redis cache configuration you posted has 3600 as default timeout as the logs do. Typo?

UPDATE: ah, now i understand you don't want that timeout but the one in the models, sorry for the noise!

@xrmx xrmx added question and removed question labels Oct 12, 2016
@plumbeo plumbeo changed the title Per table/slice cache timeouts not honored in 0.11.0 Per slice cache timeouts not honored in 0.11.0 Oct 13, 2016
@nickbarnwell
Copy link

This was affecting us as well, so I started digging in this evening. It was broken by f70d301 - working through the diff now to figure out what changed

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 551 days. Feel free to comment and request for this issue to be reopened.

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants