logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.94k stars 446 forks source link

fix(core): add redis ping interval #6819

Open simeng-li opened 4 days ago

simeng-li commented 4 days ago

Summary

  1. Add a Redis ping interval to prevent idle connections from being disconnected by Azure. For more details, refer to the Azure documentation on idle timeout.
  2. Add trySafe wrapper to the WellKnown cache getter method. Incase of any Redis connection failure, it should not affect the Logto core functionality.

Testing

Checklist

github-actions[bot] commented 4 days ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +263 Bytes

Diff by File |Name|Diff| |---|---| |packages/core/src/caches/index.ts|:chart_with_upwards_trend: +213 Bytes| |packages/core/src/caches/well-known.ts|:chart_with_upwards_trend: +50 Bytes|