Skip to the content.

28. Cache System

Date: 2023-09-15

Status

Accepted

Context

Currently, our system utilizes Redis for general-purpose caching and Dragonfly for some applications. We are considering transitioning from Redis to KeyDB due to its similarities with Redis, which means we can switch databases without changing the driver for database interaction.

graph TD
    A[Request] --> B[Service]
    B --> C[Check Cache]
    C --> D{Cache Hit?}
    D -- Yes --> E[Return Cached Data]
    D -- No --> F[Database]
    F --> G[Fetch Data]
    G --> H[Update Cache]
    H --> E

Decision

Drivers:

Given the requirements and the pros and cons of each system:

Consequences

We continue to use Redis as our cache system.

Additional Notes