{"id":25219952,"url":"https://github.com/zuopanyao/plain_cache","last_synced_at":"2025-04-05T11:17:47.025Z","repository":{"id":56837007,"uuid":"385439279","full_name":"ZuopanYao/plain_cache","owner":"ZuopanYao","description":"Persistent cache library for Dart(Flutter for iOS and Android).","archived":false,"fork":false,"pushed_at":"2021-07-14T01:27:36.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T21:49:42.086Z","etag":null,"topics":["cache-storage","dart","flutter","flutterandroid","flutterios","persistent"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/ZuopanYao.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-07-13T01:49:29.000Z","updated_at":"2021-07-13T05:30:56.000Z","dependencies_parsed_at":"2022-09-08T05:11:16.629Z","dependency_job_id":null,"html_url":"https://github.com/ZuopanYao/plain_cache","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZuopanYao%2Fplain_cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZuopanYao%2Fplain_cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZuopanYao%2Fplain_cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZuopanYao%2Fplain_cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZuopanYao","download_url":"https://codeload.github.com/ZuopanYao/plain_cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325687,"owners_count":20920715,"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-storage","dart","flutter","flutterandroid","flutterios","persistent"],"created_at":"2025-02-10T21:49:43.889Z","updated_at":"2025-04-05T11:17:47.002Z","avatar_url":"https://github.com/ZuopanYao.png","language":"Dart","readme":"# plain_cache\n\n[![Pub Package](https://img.shields.io/pub/v/plain_cache.svg)](https://pub.dartlang.org/packages/plain_cache)\n\nPersistent cache library for Dart(Flutter for iOS and Android).\n\n## Installing\n\nWith Flutter:\n\n```shell\nflutter pub add plain_cache\n```\n\nThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):\n\n``` yaml\ndependencies:\n  plain_cache: ^1.0.3\n```\n  \nAlternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.\n\n## Usage\n\n### Enable plain cache\n\n```dart\nimport 'package:plain_cache/plain_cache.dart';\n\nvoid main() {\n  // Enable Plain Cache\n  PlainCache.enable();\n\n  runApp(MyApp());\n}\n```\n\n### simple usage example:\n\nSave to persistent cache / 保存数据到持久性缓存\n\n```dart\n storage.setValue('newValue', forKey: 'MyKey');\n```\n\nRead from persistent cache / 从持久性缓存中读取数据\n\n```dart\nfinal boolValue = storage.getBool(forKey: 'MyKey');\nfinal doubleValue = storage.getDouble(forKey: 'MyKey');\nfinal intValue = storage.getInt(forKey: 'MyKey');\nfinal listValue = storage.getList(forKey: 'MyKey');\nfinal mapValue = storage.getMap(forKey: 'MyKey');\nfinal stringValue = storage.getString(forKey: 'MyKey');\n\n```\n\nRemove from persistent cache / 从持久性缓存中删除数据\n\n```dart\nstorage.remove(forKey: 'MyKey');\n\n```\n\n\n## License / 许可证\n\nplain_cache is released under the MIT license. See [LICENSE](./LICENSE) for details.\n\nplain_cache 是在 MIT 许可下发布的，有关详情请查看该许可证。","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuopanyao%2Fplain_cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuopanyao%2Fplain_cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuopanyao%2Fplain_cache/lists"}