Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-native-vk-http-cache
Advanced tools
React Native http cache control for both fetch/XMLHttpRequest and ImageView
$ npm install react-native-http-cache --save
react-native-http-cache
library from your node_modules/react-native-http-cache/ios
folder like its
described here.
Don't forget to add it to "Build Phases" of project.android/settings.gradle
include ':RCTHttpCache'
project(':RCTHttpCache').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-http-cache/android')
android/app/build.gradle
in section dependencies
...
dependencies {
...
compile project(':RCTHttpCache') // Add this line only.
}
MainActivity.java
...
import cn.reactnative.httpcache.HttpCachePackage;
// Add this line before public class MainActivity
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
...
mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.addPackage(new MainReactPackage())
.addPackage(new HttpCachePackage()) // Add this line
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
}
}
-keep class com.facebook.cache.disk.DiskStorageCache {
private boolean maybeUpdateFileCacheSize();
}
Clear cache for all type.
Return a promise which indicate the clear state.
Get cache size for all type.
Return a promise that contain the cache size(in bytes).
Clear cache for fetch/ajax only.
Return a promise which indicate the clear state.
Get cache size for fetch/ajax only.
Return a promise that contain the cache size(in bytes).
Clear cache for ImageView only.
Return a promise which indicate the clear state.
Get cache size for ImageView only.
Return a promise that contain the cache size(in bytes).
FAQs
Control http cache used by fetch/XMLHttpRequest
The npm package react-native-vk-http-cache receives a total of 0 weekly downloads. As such, react-native-vk-http-cache popularity was classified as not popular.
We found that react-native-vk-http-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.