Skip to content

Concepts: Caching

Pratik Bhattacharya edited this page Dec 20, 2021 · 3 revisions

Concepts: Caching

Multiple workflows in the Feature Flighting service has caching involved to boost performance

Cache Types

When caching data the following types of cache can be used

Cache Type Description Configuration Key
In Memory The data is cached in memory of the instance. For every type of data that's cached, a caching duration is taken into consideration to determine the caching period InMemory
Redis Data cached in Azure Cache for Redis. Read more Redus
Unified Redis Platform An open-source solution for re-utilizing Redis Cache for multiple applications. Read more. URP
No Cache Cache will be disabled NoCache

The configuration key represents the value that must added in the Configuration. See Tenant Configuration for understanding the usage.

Unified Redis Platform (URP)

Unified Redis Platform is a solution for consolidating multiple Redis Caches to a single cluster. The cluster can be shared by multiple apps but provides proper isolation to each application. This is the client-side core SDK for Unified Redis Platform. For configuring URP 3 information is needed

  1. Cluster Name
  2. Application Name
  3. Application Secret - The application secret needs to be kept in the KeyVault and Secret Key has to be added in the tenant configuration

You can either create an application for Feature Management Service or allow each tenants to have their own URP cluster and configure URP for each tenant.

Read more

Cacheable Workflows

The following workflows can be cached

  1. Feature Flag Names

    The names of all the feature flags for a tenant can be cached. This is helpful is boosting the performance of Evaluate All Flags API.
    Recommended Cache - URP or In-Memory
    Recommended Duration - 4-6 hours

  2. Feature Flag Results

    Results of the feature flag evaluation. Helpful in boosting the performance of the Evaluate API.
    Recommended Cache - No cache

  3. Graph data

    Cache the list of users from the Configured Groups. Helpful in boosting the performance of the Evaluate API, when Graph Operators are used.
    Recommended Cache - In-Memory or URP
    Recommended Duration - 24-48 hours

  4. Rules Engine JSON

    Caches the JSON file from Azure Blob containing the Rules Engine. Helpful in boosting the performance of the Evaluate API, when Rules Engine filters are used.
    Recommended Cache - In-Memory
    Recommended Duration - 4-24 hours