TXStringUpdateFilterCache
public final class TXStringUpdateFilterCache : TXDecoratorCache
Class responsible for updating the passed internalCache using a certain update policy defined
in the TXCacheUpdatePolicy enum. This is done by filtering any translations that are passed
via the update(translations:) call using an update policy that checks both the passed
translations and the internal cache state to decide whether a translation should update the internal cache
or not.
-
Initializes the cache with a certain update policy and an internal cache that will be updated according to that policy.
Declaration
Swift
@objc public init(policy: TXCacheUpdatePolicy, internalCache: TXCache)Parameters
policyThe update policy to be used
internalCacheThe internal cache to be updated with the specified update policy
-
Updates the internal cache with the provided translations using the update policy specified during initialization.
Declaration
Swift
override public func update(translations: TXTranslations)Parameters
translationsThe provided translations
View on GitHub