/
Launch Apollo Studio


CLASS

SQLiteNormalizedCache

public final class SQLiteNormalizedCache

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

Methods

init(fileURL:shouldVacuumOnClear:)

public init(fileURL: URL, 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(db:shouldVacuumOnClear:)

public init(db: Connection, shouldVacuumOnClear: Bool = false) throws

Initializer that takes the Connection to use

  • Parameters:

    • db: The database Connection to use
    • 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 access the database

Parameters

NameDescription
dbThe database Connection to use
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.
Edit on GitHub