Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
chore: remove cache module
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Sep 9, 2024
1 parent ac3455f commit 7a8cfc5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 31 deletions.
17 changes: 0 additions & 17 deletions InjectGUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
38BC1F5A2C4B98A300C3B60E /* AppDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F592C4B98A300C3B60E /* AppDetailView.swift */; };
38BC1F5C2C4BB02200C3B60E /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F5B2C4BB02200C3B60E /* SettingsView.swift */; };
38E944F22C5A761B00B252A3 /* Executor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E944F12C5A761B00B252A3 /* Executor.swift */; };
38E944F52C5A7F6A00B252A3 /* Cache in Frameworks */ = {isa = PBXBuildFile; productRef = 38E944F42C5A7F6A00B252A3 /* Cache */; };
38E944F72C5A85E200B252A3 /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E944F62C5A85E200B252A3 /* Cache.swift */; };
96BC7ED02C65C5E200149818 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 96BC7ECF2C65C5E200149818 /* Localizable.xcstrings */; };
96BC7ED62C65E7B100149818 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BC7ED52C65E7B100149818 /* AboutView.swift */; };
Expand Down Expand Up @@ -79,7 +78,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
38E944F52C5A7F6A00B252A3 /* Cache in Frameworks */,
380D777B2C61EA56005F3150 /* Sparkle in Frameworks */,
383943792C68458F00E5984E /* Inject in Frameworks */,
);
Expand Down Expand Up @@ -214,7 +212,6 @@
);
name = InjectGUI;
packageProductDependencies = (
38E944F42C5A7F6A00B252A3 /* Cache */,
380D777A2C61EA56005F3150 /* Sparkle */,
383943782C68458F00E5984E /* Inject */,
);
Expand Down Expand Up @@ -248,7 +245,6 @@
);
mainGroup = 38877A102C4A6F83009F5910;
packageReferences = (
38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */,
380D77792C61EA56005F3150 /* XCRemoteSwiftPackageReference "Sparkle" */,
383943772C68458F00E5984E /* XCRemoteSwiftPackageReference "Inject" */,
);
Expand Down Expand Up @@ -548,14 +544,6 @@
minimumVersion = 1.5.2;
};
};
38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/hyperoslo/Cache";
requirement = {
kind = exactVersion;
version = 7.2.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand All @@ -569,11 +557,6 @@
package = 383943772C68458F00E5984E /* XCRemoteSwiftPackageReference "Inject" */;
productName = Inject;
};
38E944F42C5A7F6A00B252A3 /* Cache */ = {
isa = XCSwiftPackageProductDependency;
package = 38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */;
productName = Cache;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 38877A112C4A6F83009F5910 /* Project object */;
Expand Down
28 changes: 14 additions & 14 deletions InjectGUI/Backend/Cache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
//
// Created by wibus on 2024/7/31.
//

import Cache

enum CacheKey {
static let latestCommitHash = "latestCommitHash"
}

// MARK: - Cache Configuration

// 存一个有关 main/latest commit hash 的缓存
let diskConfig = DiskConfig(name: "InjectLib")
let memoryConfig = MemoryConfig(expiry: .never, countLimit: 10, totalCostLimit: 10)
let transformer = TransformerFactory.forCodable(ofType: String.self)
let storage = try! Storage<String, String>(diskConfig: diskConfig, memoryConfig: memoryConfig, transformer: transformer)
//
//import Cache
//
//enum CacheKey {
// static let latestCommitHash = "latestCommitHash"
//}
//
//// MARK: - Cache Configuration
//
//// 存一个有关 main/latest commit hash 的缓存
//let diskConfig = DiskConfig(name: "InjectLib")
//let memoryConfig = MemoryConfig(expiry: .never, countLimit: 10, totalCostLimit: 10)
//let transformer = TransformerFactory.forCodable(ofType: String.self)
//let storage = try! Storage<String, String>(diskConfig: diskConfig, memoryConfig: memoryConfig, transformer: transformer)

0 comments on commit 7a8cfc5

Please sign in to comment.