Skip to content

Implement proper caching with support for major providers and detailed consumer control #797

Description

@Lulalaby

Summary

Implement robust caching with support for major caching providers and detailed consumer control.

The Problem

Currently, caching is not flexible or robust enough, making it difficult for consumers to adapt caching to their needs and for us to support multiple popular caching providers.

The Ideal Solution

We aim to provide a caching solution that supports multiple major providers (such as Redis, MemoryCache, etc.) and allows consumers full control over cache behavior, invalidation, and configuration. This entails:

  • Analyzing the current caching implementation and its limitations
  • Defining the target caching behavior
  • Designing an abstraction or set of interfaces for pluggable providers
  • Evaluating and integrating different providers
  • Exposing APIs/settings for detailed consumer control
  • Testing and documenting usage for developers

The Current Solution

Currently, consumers have limited or no control, and swapping providers is not practical. Most configuration is hardcoded or inflexible, limiting extensibility.

Additional Context

Tasks:

  • Analyze and document the current caching behavior and entry points
  • Research popular .NET caching libraries and providers (MemoryCache, Redis, etc.)
  • Draft the desired abstraction and API for provider pluggability and consumer control
  • Implement provider interfaces and at least two providers (MemoryCache, Redis)
  • Add tests and update documentation accordingly
  • Ensure developers can override, extend, or disable cache at various points as needed
    This will make the library more extensible, modern, and developer-friendly (and keep us extra fancy~).

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreChanges something in coredependenciesPull requests that update a dependency fileenhancementNew feature or request

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions