[GH-ISSUE #414] Cache Server Details in Redis with Automatic Revalidation #273

Open
opened 2026-03-03 11:14:26 +03:00 by kerem · 0 comments
Owner

Originally created by @charanm927 on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/dflow-sh/dflow/issues/414

Description:

Implement a Redis-based caching layer for storing server details in dFlow. The cache should automatically revalidate when:

  1. No data exists in Redis, or
  2. A new server is added.

This will reduce database queries, speed up UI/API responses, and keep data fresh without manual cache resets.

Acceptance Criteria:

  • Store server details in Redis upon initial fetch.
  • When Redis returns no data, fetch from the database and repopulate Redis.
  • On server creation, trigger a cache refresh for the affected data set.
  • Use TTL (configurable) to ensure data doesn’t get stale indefinitely.
  • Ensure cache invalidation on relevant updates (rename, delete, status change).
  • Add logs for cache hits, misses, and refresh events.

Benefits:

  • Improves performance by reducing DB load.
  • Keeps server data up-to-date without manual intervention.
  • Provides a consistent and predictable cache refresh flow.
Originally created by @charanm927 on GitHub (Aug 13, 2025). Original GitHub issue: https://github.com/dflow-sh/dflow/issues/414 **Description:** Implement a Redis-based caching layer for storing server details in dFlow. The cache should automatically revalidate when: 1. No data exists in Redis, or 2. A new server is added. This will reduce database queries, speed up UI/API responses, and keep data fresh without manual cache resets. **Acceptance Criteria:** - Store server details in Redis upon initial fetch. - When Redis returns no data, fetch from the database and repopulate Redis. - On server creation, trigger a cache refresh for the affected data set. - Use TTL (configurable) to ensure data doesn’t get stale indefinitely. - Ensure cache invalidation on relevant updates (rename, delete, status change). - Add logs for cache hits, misses, and refresh events. Benefits: - Improves performance by reducing DB load. - Keeps server data up-to-date without manual intervention. - Provides a consistent and predictable cache refresh flow.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dflow#273
No description provided.