dosubot[bot] commented on issue #32588:
URL: https://github.com/apache/superset/issues/32588#issuecomment-2713490867

   <!-- Greeting -->
   Hey @Anton-Kartashev! I'm here to help you with your Superset issue. I'm a 
bot that can assist with bug fixes, answer questions, and guide you on becoming 
a contributor. Let's work together to solve this!
   
   <!-- Answer -->
   To resolve the issue of different Redis keys being generated for UI and 
Celery tasks in Superset version 4.1.1, ensure that both the UI and Celery 
tasks are using the same Redis configuration, particularly the same 
`CACHE_KEY_PREFIX`. In your configuration, the `CACHE_KEY_PREFIX` is set to 
`'superset_'` for the UI cache:
   
   ```python
   CACHE_CONFIG = {
       "CACHE_TYPE": "RedisCache",
       "CACHE_DEFAULT_TIMEOUT": 3600,
       "CACHE_KEY_PREFIX": "superset_",
       "CACHE_REDIS_URL": CACHE_REDIS_URL,
   }
   ```
   
   Make sure that the Celery tasks are also using the same `CACHE_KEY_PREFIX` 
by configuring the `RESULTS_BACKEND` with the same prefix. You can do this by 
ensuring that the Celery configuration aligns with the UI cache configuration. 
Here's an example of how you might configure the `RESULTS_BACKEND`:
   
   ```python
   RESULTS_BACKEND = RedisCache(
       host=env('REDIS_HOST'),
       password=env('REDIS_PASSWORD'),
       port=env('REDIS_PORT'),
       key_prefix='superset_',  # Ensure this matches the UI cache prefix
       ssl=True,
       ssl_cert_reqs=env('REDIS_SSL_CERT_REQS'),
   )
   ```
   
   By aligning the `CACHE_KEY_PREFIX` for both the UI and Celery tasks, you can 
ensure that the cache keys are consistent, allowing the cache warmup task to 
update the dashboard correctly 
<sup>[[1]](https://github.com/apache/superset/blob/master/helm/superset/templates/_helpers.tpl)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/ea436bce-7e25-4fba-b2d8-23abecd7d6bc?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/ea436bce-7e25-4fba-b2d8-23abecd7d6bc?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/ea436bce-7e25-4fba-b2d8-23abecd7d6bc?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/ea436bce-7e25-4fba-b2d8-23abecd7d6bc?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/ea436bce-7e25-4fba-b2d8-23abecd7d6bc?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/ea436bce-7e25-4fba-b2d8-23abecd7d6bc?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/ea436bce-7e25-4fba-b2d8-23abecd7d6bc?feedback_type=other)</sup>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to