Skip to content

Commit a4b6058

Browse files
committed
Use cache directory
1 parent 8db5f68 commit a4b6058

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Source/Shared/Storage/DiskStorage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final public class DiskStorage<T> {
2727
url = directory
2828
} else {
2929
url = try fileManager.url(
30-
for: .documentDirectory,
30+
for: .cachesDirectory,
3131
in: .userDomainMask,
3232
appropriateFor: nil,
3333
create: true

Tests/iOS/Tests/Storage/DiskStorageTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class DiskStorageTests: XCTestCase {
3030
/// Test that it returns the correct path
3131
func testDefaultPath() {
3232
let paths = NSSearchPathForDirectoriesInDomains(
33-
.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true
33+
.cachesDirectory, FileManager.SearchPathDomainMask.userDomainMask, true
3434
)
3535
let path = "\(paths.first!)/\(config.name.capitalized)"
3636
XCTAssertEqual(storage.path, path)

0 commit comments

Comments
 (0)