目录
目录README.md

Cached

This library aims to be a lightweight wrapper for caching Codable types.

Installation

Swift Package Manager

Add Cached as a dependency by including it under dependencies in the package manifest file, Package.swift.

dependencies: [
    .package(url: "https://github.com/devmaximilian/cached.git", from: "x.x.x")
]

Usage

struct Article: Codable {
    let title: String
    let description: String
}

class Service {
    init() {}

    @Cached(key: "articles", defaultValue: [], ttl: .minutes(30))
    var articles: [Article]
}

License

Cached is released under the MIT license. See LICENSE for details.

关于
45.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号