superset icon indicating copy to clipboard operation
superset copied to clipboard

Per slice cache timeouts not honored in 0.11.0

Open plumbeo opened this issue 10 years ago • 3 comments

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.

plumbeo avatar Oct 12 '16 10:10 plumbeo

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 avatar Oct 12 '16 10:10 xrmx

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

nickbarnwell avatar Oct 19 '16 03:10 nickbarnwell

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.

mistercrunch avatar Apr 23 '18 05:04 mistercrunch