{"id":23715450,"url":"https://github.com/orzhtml/react-native-orzhtml-httpcache","last_synced_at":"2026-06-11T16:32:17.756Z","repository":{"id":57338844,"uuid":"288055592","full_name":"orzhtml/react-native-orzhtml-httpcache","owner":"orzhtml","description":"Control http cache used by fetch/XMLHttpRequest","archived":false,"fork":false,"pushed_at":"2020-08-17T10:21:50.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T02:34:42.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/orzhtml.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":"2020-08-17T01:24:21.000Z","updated_at":"2022-05-04T20:09:25.000Z","dependencies_parsed_at":"2022-09-01T20:34:07.525Z","dependency_job_id":null,"html_url":"https://github.com/orzhtml/react-native-orzhtml-httpcache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/orzhtml/react-native-orzhtml-httpcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-httpcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-httpcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-httpcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-httpcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orzhtml","download_url":"https://codeload.github.com/orzhtml/react-native-orzhtml-httpcache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-httpcache/sbom","scorecard":{"id":713004,"data":{"date":"2025-08-11","repo":{"name":"github.com/orzhtml/react-native-orzhtml-httpcache","commit":"9de3ebd374233b5e7a96caa7c2e188b2e12359d2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T08:41:39.229Z","repository_id":57338844,"created_at":"2025-08-22T08:41:39.229Z","updated_at":"2025-08-22T08:41:39.229Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34208762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":"2024-12-30T20:56:32.040Z","updated_at":"2026-06-11T16:32:17.724Z","avatar_url":"https://github.com/orzhtml.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"React Native http cache control for both fetch/XMLHttpRequest and ImageView\n\n- [√] iOS\n- [√] Android\n\n## Installation\n\n```sh\n$ npm install react-native-orzhtml-httpcache --save\n```\n\n## iOS: Linking in your XCode project\n\n- Link `react-native-orzhtml-httpcache` library from your `node_modules/react-native-orzhtml-httpcache/ios` folder like its\n  [described here](http://facebook.github.io/react-native/docs/linking-libraries-ios.html).\n  Don't forget to add it to \"Build Phases\" of project.\n\n## Android: Linking to your gradle Project\n\n- Add following lines into `android/settings.gradle`\n\n```\ninclude ':RCTHttpCache'\nproject(':RCTHttpCache').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-orzhtml-httpcache/android')\n```\n\n- Add following lines into your `android/app/build.gradle` in section `dependencies`\n\n```\n...\ndependencies {\n   ...\n   compile project(':RCTHttpCache')    // Add this line only.\n}\n```\n\n- Add following lines into `MainApplication.java`\n\n```java\n...\nimport cn.orzhtml.httpcache.HttpCachePackage;\n      // Add this line before public class MainApplication\n\npublic class MainApplication extends Application implements ReactApplication {\n\n  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n    @Override\n    protected boolean getUseDeveloperSupport() {\n      return BuildConfig.DEBUG;\n    }\n\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n          new HttpCachePackage(), // Add this line\n          new MainReactPackage()\n      );\n    }\n  };\n\n  @Override\n  public ReactNativeHost getReactNativeHost() {\n      return mReactNativeHost;\n  }\n}\n```\n\n- Add these lines to 'proguard-rules.pro' if you need to minify your java code:\n\n```\n-keep class com.facebook.cache.disk.DiskStorageCache {\n   private boolean maybeUpdateFileCacheSize();\n}\n```\n\n## JavaScript: import all and invoke!\n\n```js\nimport * as CacheManager from 'react-native-orzhtml-httpcache';\n\n// invoke API directly when in need\nCacheManager.clearCache();\n\n```\n\n## API Documentation\n\n#### clearCache()\n\nClear cache for all type.\n\nReturn a promise which indicate the clear state.\n\n#### getCacheSize()\n\nGet cache size for all type.\n\nReturn a promise that contain the cache size(in bytes).\n\n#### clearHttpCache()\n\nClear cache for fetch/ajax only.\n\nReturn a promise which indicate the clear state.\n\n#### getHttpCacheSize()\n\nGet cache size for fetch/ajax only.\n\nReturn a promise that contain the cache size(in bytes).\n\n#### clearImageCache()\n\nClear cache for ImageView only.\n\nReturn a promise which indicate the clear state.\n\n#### getImageCacheSize()\n\nGet cache size for ImageView only.\n\nReturn a promise that contain the cache size(in bytes).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forzhtml%2Freact-native-orzhtml-httpcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forzhtml%2Freact-native-orzhtml-httpcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forzhtml%2Freact-native-orzhtml-httpcache/lists"}