View Source Unleash.Cache (Unleash v1.10.0)

This module is a cache backed by an ETS table. We use it to allow for multiple threads to read the feature flag values concurrently on top of minimizing network calls

Summary

Functions

Will return all values currently stored in the cache

Will return the feature for the given name stored in the cache

Will return all features stored in the cache

Will create a new ETS table named :unleash_cache

Will upsert (create or update) the given features in the cache

Functions

Link to this function

get_all_feature_names(table_name \\ :unleash_cache)

View Source

Will return all values currently stored in the cache

Link to this function

get_feature(name, table_name \\ :unleash_cache)

View Source

Will return the feature for the given name stored in the cache

Link to this function

get_features(table_name \\ :unleash_cache)

View Source

Will return all features stored in the cache

Link to this function

init(existing_features \\ [], table_name \\ :unleash_cache)

View Source

Will create a new ETS table named :unleash_cache

Link to this function

upsert_features(features, table_name \\ :unleash_cache)

View Source

Will upsert (create or update) the given features in the cache

This will clear the existing peristed features to prevent stale reads