{"id":29829167,"url":"https://github.com/beapp/beapp.library.cache.ios","last_synced_at":"2025-07-29T08:16:11.276Z","repository":{"id":45067332,"uuid":"171294143","full_name":"BeApp/beapp.library.cache.ios","owner":"BeApp","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-11T11:07:06.000Z","size":78,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T06:02:46.471Z","etag":null,"topics":[],"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/BeApp.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":"2019-02-18T13:59:17.000Z","updated_at":"2024-02-14T08:13:04.000Z","dependencies_parsed_at":"2022-09-13T22:51:16.111Z","dependency_job_id":null,"html_url":"https://github.com/BeApp/beapp.library.cache.ios","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/BeApp/beapp.library.cache.ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeApp%2Fbeapp.library.cache.ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeApp%2Fbeapp.library.cache.ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeApp%2Fbeapp.library.cache.ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeApp%2Fbeapp.library.cache.ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeApp","download_url":"https://codeload.github.com/BeApp/beapp.library.cache.ios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeApp%2Fbeapp.library.cache.ios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267652977,"owners_count":24122101,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-07-29T08:15:26.238Z","updated_at":"2025-07-29T08:16:11.271Z","avatar_url":"https://github.com/BeApp.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeappCache\n\nThis library provides a cache mechanism relying on [RxSwift](https://github.com/ReactiveX/RxSwift).\nThere are currently one storage implementation :\n\n* [Cache](https://github.com/hyperoslo/Cache)\n\n## Installation\n\nTo install it, simply add the following line to your Podfile:\n\n```\npod 'BeappCache'\n```\n\n## Usage\n\n1. Declare an instance of RxCacheManager with the storage implementation desired\n2. Call `fromKey` method from RxCacheManager instance and define your key\n3. Add your asynchronous operation into  `.withAsync()`  (⚠️ Must be a single observer)\n4. Define your cache strategy into `.withStrategy()`\n5. Fetch the result (Return an Observable)\n\n```\nlet rxCacheManager = RxCacheManager()\nrxCacheManager.fromKey(key: \"key_xxx\")\n.withAsync(singleString)\n.withStrategy(.justAsync)\n.fetch()\n```\n\n## RxCacheManager configuration\n\n### Verbose\n* `RxCacheManager(verbose: true)`\n\n1. Enable verbose log of RxCacheManager\n\n### Default configuration\n* `RxCacheManager()`\n\n1. Use  the Cache librairy\n2. Cache configuration is by default `DiskConfig(name: \"Floppy\")` and `MemoryConfig(expiry: .never, countLimit: 10, totalCostLimit: 10)`\n\n### Cache with configuration\n* `RxCacheManager(storageType: .cache(config: cacheConfig))`\n\n1. Use the cache librairy\n2. Define your cache configuration like next  `let cacheConfig = CacheStorageConfig(diskConfig: DiskConfig(name: \"your_name\"), memoryConfig: MemoryConfig(expiry: expiry, countLimit: Uint, totalCostLimit: Uint))`\n\n### Custom storage protocol\n* `RxCacheManager(storageType: .custom(storage: YourExternalStorageProtocol()))`\n\n1. Define your own `ExternalStorageProtocol`\n\n## Result\n\n```\n[BeappCache] [Cache] CacheWrapper with the key key_xxx saved\nSuccess async request or data from cache\n\n[BeappCache] [Cache] CacheWrapper with the key key_xxx saved\nSuccess async request\n\n[BeappCache] [Cache] CacheWrapper for key_xxx retrieved from cache\nSuccess to get data from cache\n```\n\n## Author\n\nBeapp, contact@beapp.fr\n\n## License\n\nBeappCache is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeapp%2Fbeapp.library.cache.ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeapp%2Fbeapp.library.cache.ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeapp%2Fbeapp.library.cache.ios/lists"}