@@ -29,6 +29,13 @@ public final class SQLiteBackedCache<Value: Codable>: Closable {
29
29
private let jsonEncoder : JSONEncoder
30
30
private let jsonDecoder : JSONDecoder
31
31
32
+ /// Creates a SQLite-backed cache.
33
+ ///
34
+ /// - Parameters:
35
+ /// - tableName: The SQLite table name. Must follow SQLite naming rules (e.g., no spaces).
36
+ /// - location: SQLite.Location
37
+ /// - configuration: Optional. Configuration for the cache.
38
+ /// - diagnosticsEngine: DiagnosticsEngine
32
39
public init ( tableName: String , location: SQLite . Location , configuration: SQLiteBackedCacheConfiguration = . init( ) , diagnosticsEngine: DiagnosticsEngine ? = nil ) {
33
40
self . tableName = tableName
34
41
self . location = location
@@ -44,6 +51,13 @@ public final class SQLiteBackedCache<Value: Codable>: Closable {
44
51
self . jsonDecoder = JSONDecoder . makeWithDefaults ( )
45
52
}
46
53
54
+ /// Creates a SQLite-backed cache.
55
+ ///
56
+ /// - Parameters:
57
+ /// - tableName: The SQLite table name. Must follow SQLite naming rules (e.g., no spaces).
58
+ /// - path: The path of the SQLite database.
59
+ /// - configuration: Optional. Configuration for the cache.
60
+ /// - diagnosticsEngine: DiagnosticsEngine
47
61
public convenience init ( tableName: String , path: AbsolutePath , configuration: SQLiteBackedCacheConfiguration = . init( ) , diagnosticsEngine: DiagnosticsEngine ? = nil ) {
48
62
self . init ( tableName: tableName, location: . path( path) , configuration: configuration, diagnosticsEngine: diagnosticsEngine)
49
63
}
0 commit comments