Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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.

About

No description or website provided.

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.