TXFileOutputCacheDecorator
public final class TXFileOutputCacheDecorator : TXDecoratorCache
Decorator class responsible for storing any updates of the translations to a file url specified in the constructor.
-
Initializes the decorator with a specific file url for storing the translations to the disk and an internal cache.
Declaration
Swift
@objc public init(fileURL: URL?, internalCache: TXCache)Parameters
fileURLThe file url
internalCacheThe internal cache
-
Encodes the provided translations to a JSON string and writes the string to a file using the
fileURLproperty of the constructor.Declaration
Swift
public override func update(translations: TXTranslations)Parameters
translationsThe provided translations
View on GitHub