mirror of
https://github.com/langgenius/dify.git
synced 2026-03-20 05:57:59 +08:00
Cache license status for 10 minutes to reduce HTTP calls to enterprise API. Only caches license status, not full system features. Changes: - Add EnterpriseService.get_cached_license_status() method - Cache key: enterprise:license:status - TTL: 600 seconds (10 minutes) - Graceful degradation: falls back to API call if Redis fails Performance improvement: - Before: HTTP call (~50-200ms) on every API request - After: Redis lookup (~1ms) on cached requests - Reduces load on enterprise service by ~99%