{"id":17068991,"url":"https://github.com/kgn/kgncache","last_synced_at":"2025-03-23T10:41:36.160Z","repository":{"id":138801049,"uuid":"44161390","full_name":"kgn/KGNCache","owner":"kgn","description":"Simple disk + memory cache with date expirations","archived":false,"fork":false,"pushed_at":"2018-01-21T03:59:28.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T17:15:46.158Z","etag":null,"topics":["cache","carthage","cocoapods","ios","swift","travis"],"latest_commit_sha":null,"homepage":null,"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/kgn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-13T08:05:12.000Z","updated_at":"2017-02-15T21:13:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"47a8f7ae-f35f-434b-ac62-a169214ee4a8","html_url":"https://github.com/kgn/KGNCache","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kgn","download_url":"https://codeload.github.com/kgn/KGNCache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090894,"owners_count":20559296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cache","carthage","cocoapods","ios","swift","travis"],"created_at":"2024-10-14T11:15:50.249Z","updated_at":"2025-03-23T10:41:36.138Z","avatar_url":"https://github.com/kgn.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KGNCache\n\n`KGNCache` is a memory and file based cache. If the object exists on the file system it’s returned from there and added to the memory cache. `KGNCache` uses `NSCache` under the hood for the memory cache so will automatically clear out objects under memory pressure.\n\n[![Release](https://img.shields.io/github/release/kgn/KGNCache.svg)](/releases)\n[![License](http://img.shields.io/badge/License-MIT-lightgrey.svg)](/LICENSE)\n\n[![Build Status](https://travis-ci.org/kgn/KGNCache.svg)](https://travis-ci.org/kgn/KGNCache)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-Compatible-4BC51D.svg)](https://github.com/Carthage/Carthage)\n[![CocoaPods Version](https://img.shields.io/cocoapods/v/KGNCache.svg)](https://cocoapods.org/pods/KGNCache)\n[![CocoaPods Platforms](https://img.shields.io/cocoapods/p/KGNCache.svg)](https://cocoapods.org/pods/KGNCache)\n\n[![Twitter](https://img.shields.io/badge/Twitter-@iamkgn-55ACEE.svg)](http://twitter.com/iamkgn)\n[![Follow](https://img.shields.io/github/followers/kgn.svg?style=social\u0026label=Follow%20%40kgn)](https://github.com/kgn)\n[![Star](https://img.shields.io/github/stars/kgn/KGNCache.svg?style=social\u0026label=Star)](https://github.com/kgn/KGNCache)\n\n## Installing\n\n### Carthage\n```\ngithub \"kgn/KGNCache\"\n```\n\n### CocoaPods\n```\npod 'KGNCache'\n```\n\n## Examples\n\n``` Swift\nlet name = \"Steve Jobs\"\n\nlet cache = Cache(named: \"names\")\ncache.setObject(name, forKey: \"name\")\n\ncache.objectForKey(key) {\n    print($0) // Steve Jobs\n}\n```\n\nTODO:\n- [X] Travis\n- [X] Badges\n- [X] Tests\n- [X] Carthage\n- [ ] CocoaPods (Just need to publish)\n- [ ] Description (Add expiration example)\n- [X] Documentation\n- [X] AppleTV\n- [X] AppleWatch\n- [X] Prebuilt Frameworks\n- [ ] Travis Test Matrix\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgn%2Fkgncache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgn%2Fkgncache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgn%2Fkgncache/lists"}