TXDiskCacheProvider

public final class TXDiskCacheProvider : NSObject, TXCacheProvider

Cache provider that loads translations from disk

  • The translations extracted from disk after initialization.

    Declaration

    Swift

    public let translations: TXTranslations?
  • Initializes the disk cache provider with a file URL from disk synchronously.

    The disk cache provider expects the file to be encoded in JSON format using the TXTranslations data structure.

    Declaration

    Swift

    @objc
    public init(fileURL: URL)

    Parameters

    fileURL

    The file url of the file that contains the translations

  • Declaration

    Swift

    public func getTranslations() -> TXTranslations?