You are viewing documentation for a previous version of this software.

Switch to the latest stable version.

SQLiteNormalizedCache


CLASS

SQLiteNormalizedCache

Swift
1public final class SQLiteNormalizedCache

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

Methods

init(fileURL:databaseType:shouldVacuumOnClear:)

Swift
1public init(fileURL: URL,
2            databaseType: SQLiteDatabase.Type = SQLiteDotSwiftDatabase.self,
3            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:)

Swift
1public init(database: SQLiteDatabase,
2            shouldVacuumOnClear: Bool = false) throws
Feedback

Edit on GitHub

Forums