SQLiteBackedCache
SQLite backed persistent cache.
final class SQLiteBackedCache<Value> where Value : Decodable, Value : Encodable
SQLite backed persistent cache.
final class SQLiteBackedCache<Value> where Value : Decodable, Value : Encodable
import Basics
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
init(tableName: String, location: SQLite.Location, configuration: SQLiteBackedCacheConfiguration = .init())
Creates a SQLite-backed cache.
convenience init(tableName: String, path: AbsolutePath, configuration: SQLiteBackedCacheConfiguration = .init())
Creates a SQLite-backed cache.
let configuration: SQLiteBackedCacheConfiguration
let fileSystem: FileSystem
let location: SQLite.Location
let tableName: String
func close() throws
func get(key: Key) throws -> Value?
func put(key: Key, value: Value, replace: Bool = false, observabilityScope: ObservabilityScope? = nil) throws
func remove(key: Key) throws
typealias Key = String