Skip to content

Commit

Permalink
Extended new protocol method
Browse files Browse the repository at this point in the history
  • Loading branch information
ashlirankin committed Jan 31, 2023
1 parent cedc9bd commit 2868294
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Persister/DiskCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ extension DiskCache: Cache {
// MARK: - Cache

public func write<Item: Codable>(item: Item, forKey key: String) throws {
try write(item: item, forKey: key, expirationPolicy: expirationPolicy)
}

public func write<Item: Codable>(item: Item, forKey key: String, expirationPolicy: CacheExpirationPolicy) throws {
try diskManager.createDirectoryIfNecessary(directoryURL: rootDirectoryURL)

let filePath = persistencePath(forKey: key)
Expand Down

0 comments on commit 2868294

Please sign in to comment.