gabotorresruiz commented on code in PR #35832:
URL: https://github.com/apache/superset/pull/35832#discussion_r2516507266


##########
superset/utils/slack.py:
##########
@@ -59,80 +56,162 @@ def get_slack_client() -> WebClient:
     return client
 
 
-@cache_util.memoized_func(
-    key="slack_conversations_list",
-    cache=cache_manager.cache,
-)
-def get_channels() -> list[SlackChannelSchema]:

Review Comment:
   Done! I've preserved the existing cache and the cache-warmup task but now it 
works along side the pagination logic I've implemented. 
   
   I've also added a cache boundary fallback: when pagination exceeds cached 
data (e.g., workspace with 50K channels but only 20K cached), the system 
automatically continues fetching from the Slack API.
   
   There's some new feature flags:
   - `SLACK_ENABLE_CACHING` (bool, default True) - Toggle caching on/off
   - `SLACK_CACHE_MAX_CHANNELS` (int, default 20000) - Max channels to cache 
during warmup
   - `SLACK_CACHE_WARMUP_TIMEOUT` (int, default 300) - Celery task timeout in 
seconds
   
   When cache warmup hits `SLACK_CACHE_MAX_CHANNELS`, it stores a continuation 
cursor. If users paginate beyond cached data, or tries to search a channel that 
isn't cached, the system seamlessly falls back to the Slack API.
   
   @eschutho @Vitor-Avila please take a look into this new additions in the 
last commit --> 
[bed6355](https://github.com/apache/superset/pull/35832/commits/bed6355efeecfdb1d01f0132b5fed5d43d9a859a)
   
   Let me know your thoughts 



-- 
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