Registry / security / simple-cache-provider

simple-cache-provider

JSON →
library0.10.0jsnpmunverified

An experimental, unstable cache provider for React applications, published at version 0.10.0 alongside early React alpha releases. It is intended only as a reference for advanced caching implementations and explicitly warns against use in production. The API is subject to breaking changes between versions and was deprecated in favor of built-in React cache solutions. No release cadence; this package is part of the React experimental releases.

npm install simple-cache-provider
INSTALL
IMPORT
SIG · SIMPLE-CACHE-PROVI
S
simple-cache-provider
securityjavascriptv0.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createCache
import { createCache } from 'simple-cache-provider'
const createCache = require('simple-cache-provider')
ESM-only; CJS require will fail as the package exports an ES module.
CacheProvider
import { CacheProvider } from 'simple-cache-provider'
import * as CacheProvider from 'simple-cache-provider'
Named export, not default export.
default import
import SimpleCache from 'simple-cache-provider'
Almost never used; default export is an internal object.

Shows how to create a cache instance and wrap an app with CacheProvider using the named exports.

import { createCache, CacheProvider } from 'simple-cache-provider'; import React from 'react'; const cache = createCache(/* optional config */); function App() { return ( <CacheProvider cache={cache}> <div>Cache example</div> </CacheProvider> ); } export default App;
Debug
Known issues
breakingAPI will change wildly between versions: do not use in production.
fix
Use React's built-in cache or a stable caching library like react-cache.
affects: >=0.1.0
deprecatedThis package is deprecated and no longer maintained. It was only for experimental React features.
fix
Migrate to React's official caching solutions.
affects: all
gotchaThe package exports ES modules only; CommonJS require() will not work.
fix
Ensure your environment supports ES modules (e.g., use a bundler).
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'simple-cache-provider' or its corresponding type declarations.
Package may not be installed or is not in node_modules.
fix
npm install simple-cache-provider@0.10.0
require() of ES Module not supported.
Attempting to import the ES module with CommonJS require.
fix
Use import statement instead of require.
Upgrade
Version history
0.10.0latest on npm
Audit
Dependencies
reactrequiredPeer dependency on React ^16.3.0-alpha.1, required for the provider context.
Agent activity
11 hits · last 30 days
node
10
Resources
simple-cache-provider — npm install simple-cache-provider · libregistry