SqlNormalizedCacheFactory

expect class SqlNormalizedCacheFactory : NormalizedCacheFactory

Creates a new NormalizedCacheFactory that uses a persistent cache based on Sqlite

actual class SqlNormalizedCacheFactory : NormalizedCacheFactory

Parameters

name

: the name of the database or null for an in-memory database When not in memory, the database will be stored in a platform specific folder

  • on Android it will use Context.getDatabaseName

  • on MacOS, it will use "Application Support/databases/name"

  • on the JVM, it will use "System.getProperty("user.home")/.apollo" Default: "apollo.db"

withDates

: whether to store dates (receive dates or expiration dates) Once a database is created, this parameter cannot change Default: false

Constructors

Link copied to clipboard
fun SqlNormalizedCacheFactory(    url: String,     properties: Properties = Properties(),     withDates: Boolean = false)
Link copied to clipboard
fun SqlNormalizedCacheFactory(    name: String?,     withDates: Boolean,     baseDir: String?)
Link copied to clipboard
expect fun SqlNormalizedCacheFactory(driver: SqlDriver, withDates: Boolean = false)
actual fun SqlNormalizedCacheFactory(driver: SqlDriver, withDates: Boolean)
Link copied to clipboard
expect fun SqlNormalizedCacheFactory(name: String? = "apollo.db", withDates: Boolean = false)
actual fun SqlNormalizedCacheFactory(name: String?, withDates: Boolean)

Functions

Link copied to clipboard
fun chain(factory: NormalizedCacheFactory): NormalizedCacheFactory
fun chain(factory: NormalizedCacheFactory): NormalizedCacheFactory
Link copied to clipboard
abstract fun create(): NormalizedCache
open override fun create(): SqlNormalizedCache
Link copied to clipboard
fun createChain(): NormalizedCache
fun createChain(): NormalizedCache