Lightweight Caching Library for Swift. Inspired by Swift By Sundell.
Making an app feel fast and responsive isn’t only about tweaking the way its UI is rendered, or improving the sheer execution speed of its operations and algorithms — it’s often just as much about efficiently managing its data and avoiding unnecessary work.
Many apps do not need an expansive database for managing the data. An efficent implementation that works easily with the Codable protocol is likely more than enough for your average application. The main goal of any software is to create quickly with readability and replaceability. This package is intended to do that, while allowing extensibility if needed.
entryLifetime
createdDate
for Entry
status
property (e.g. fresh, expired)Example 😊
let name = "SwiftStore"
let key = "key"
let store = Cache<String,String>()
store.insert(name, forKey: key)
// Then
let result = store[test.id]
// or
let result = store.value(forKey:key)
Publish is distributed using the Swift Package Manager. To install it into a project, add it as a dependency within your Package.swift
manifest:
let package = Package(
...
dependencies: [
.package(url: "https://github.com/TySchultz/SwiftStore.git", from: "0.1.0")
],
...
)
Then import Publish wherever you’d like to use it:
import SwiftStore
For more information on how to use the Swift Package Manager, check out this article, or its official documentation.
link |
Stars: 0 |
Last commit: 3 years ago |
First
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics