{"id":28788814,"url":"https://github.com/song-react/cache","last_synced_at":"2026-04-28T13:39:33.490Z","repository":{"id":62447937,"uuid":"99236316","full_name":"song-react/Cache","owner":"song-react","description":"A  light weight \u0026 high performance cache for iOS, macOS, tvOS and watchOS","archived":false,"fork":false,"pushed_at":"2018-09-10T14:59:28.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T10:30:30.702Z","etag":null,"topics":["apple","cache","carthage","ios","macos","swift","tvos","watchos"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/song-react.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-03T13:37:10.000Z","updated_at":"2018-09-10T14:59:29.000Z","dependencies_parsed_at":"2022-11-01T23:17:41.971Z","dependency_job_id":null,"html_url":"https://github.com/song-react/Cache","commit_stats":null,"previous_names":["dingsoung/model-cache","dingsong0/cache","song-dr/cache","song-crypto/cache","song-usa/cache","song-react/cache","dingsoung/cache"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/song-react/Cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/song-react","download_url":"https://codeload.github.com/song-react/Cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FCache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32383783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","cache","carthage","ios","macos","swift","tvos","watchos"],"created_at":"2025-06-17T21:03:54.981Z","updated_at":"2026-04-28T13:39:33.485Z","avatar_url":"https://github.com/song-react.png","language":"Swift","funding_links":["https://paypal.me/DingSongwen"],"categories":[],"sub_categories":[],"readme":"![Release](https://img.shields.io/github/release/DingSoung/Cache.svg)\n![Status](https://travis-ci.org/DingSoung/Model-Cache.svg?branch=master)\n\n![CocoaPods](https://img.shields.io/cocoapods/v/Cache.svg)\n![Carthage](https://img.shields.io/badge/Carthage-compatible-yellow.svg?style=flat)\n![SwiftPackage](https://img.shields.io/badge/SwiftPackage-compatible-E66848.svg?style=flat)\n\n![Language](https://img.shields.io/badge/Swift-4.1-FFAC45.svg?style=flat)\n![Platform](http://img.shields.io/badge/Platform-iOS|tvOS|macOS|watchOS-E9C2BD.svg?style=flat)\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-9EA59D.svg)](https://paypal.me/DingSongwen)\n\n### 安装\n#### Carthage\n\nadd code below to your Cartfile and command `carthage update`\n\n```shell\ngithub \"DingSoung/Cache\"\n```\n\n#### Swift Package Manager\n\nfollow the [SPMExample](https://github.com/DingSoung/SPMExample), UIKit excluded\n\n```swift\nimport PackageDescription\nlet package = Package(\n    name: \"SPMExample\",\n    dependencies: [\n        .Package(url: \"https://github.com/DingSoung/Cache.git\", Version(0,4,0)),\n    ]\n)\n```\n\n### 缓存设计\n\n* 线程安全\n* 支持读写\n* 写入自动创建文件夹\n* 支持删除单个文件或目录\n* 支持内存加速\n* 支持读取失败回调(延迟)\n* 支持返回写、删失败详情信息\n\n### 用法\n\n```objective-c\nUserModel *user = [UserModel cacheForKeyPath:@\"/users/uid03879658\" fail:^(NSError * _Nonnull error) {\n    NSLog(@\"%@\", error);\n}];\nNSError *err1 = [UserModel removeCacheForKeyPath:@\"/users/uid03879658\"];\nNSError *err2 = [UserModel removeCacheForPath:@\"/users\"];\n```\n\n高级用法参考[这里](https://github.com/DingSoung/Example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsong-react%2Fcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsong-react%2Fcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsong-react%2Fcache/lists"}