Launch Apollo Studio


CLASS

SQLiteNormalizedCache

public final class SQLiteNormalizedCache

A NormalizedCache implementation which uses a SQLite database to store data.

Methods

init(fileURL:databaseType:shouldVacuumOnClear:)

public init(fileURL: URL,
            databaseType: SQLiteDatabase.Type = SQLiteDotSwiftDatabase.self,
            shouldVacuumOnClear: Bool = false) throws

Designated initializer

  • Parameters:

    • fileURL: The file URL to use for your database.
    • shouldVacuumOnClear: If the database should also be VACCUMed on clear to remove all traces of info. Defaults to false since this involves a performance hit, but this should be used if you are storing any Personally Identifiable Information in the cache.
  • Throws: Any errors attempting to open or create the database.

Parameters

NameDescription
fileURLThe file URL to use for your database.
shouldVacuumOnClearIf the database should also be VACCUMed on clear to remove all traces of info. Defaults to false since this involves a performance hit, but this should be used if you are storing any Personally Identifiable Information in the cache.

init(database:shouldVacuumOnClear:)

public init(database: SQLiteDatabase,
            shouldVacuumOnClear: Bool = false) throws
Edit on GitHub