Swiftpack.co - dan-hart/DHCacheKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by dan-hart.
dan-hart/DHCacheKit push
Caching values in Swift
⭐️ 0
🕓 6 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/dan-hart/DHCacheKit.git", from: "push")

DHCacheKit

Insert Values

let cache = Cache<String, [String]>(useLocalDisk: true)
cache.insert(["1", "2", "3"], forKey: "Numbers")

Read Values

let entry = cache.entry(forKey: "Numbers")
print(entry.value) // ["1", "2", "3"]

Other features

  • Persist to disk
  • Friendly cache size "8 MB"
  • Clear all

GitHub

link
Stars: 0
Last commit: Yesterday
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v0.0.4
Yesterday

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics