FeatureFlagResultCache
public protocol FeatureFlagResultCache : Actor
Feature Flag result cache
-
cache(flag:Asynchronousttl: ) Caches a flag for the given cachTTL.
Declaration
Swift
func cache(flag: FeatureFlag, ttl: TimeInterval) asyncParameters
flagThe flag to cache
ttlThe time to cache the value for.
-
flag(name:Asynchronous) Gets a flag from the cache.
Declaration
Swift
func flag(name: String) async -> FeatureFlag?Parameters
nameThe flag name.
Return Value
The flag if its in the cache, otherwise nil.
-
removeCachedFlag(name:Asynchronous) Removes a flag from the cache.
Declaration
Swift
func removeCachedFlag(name: String) asyncParameters
nameThe flag name.
View on GitHub