Skip to content

Disable caching when fetching Level 1 and Level 2 JSON files #463

Open
@vdhamer

Description

@vdhamer
extension URLSession {
    static let noCacheSession: URLSession = {
        let config = URLSessionConfiguration.default
        config.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
        return URLSession (configuration: config)
    } ()
}

See Hacking with Swift > Swift Concurrency by Example (Nov 2024) > Section 1 > video 7 (computed properties)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConcurrencySwift structured concurrency & Swift6 data race preventionEnhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions