apollographql/apollo-cache-persist
apollographql/apollo-cache-persist has 1,419 GitHub stars and 123 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-07 06:22 UTC. Last push 2026-10-20.
🎏 Simple persistence for all Apollo Cache implementations
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalapollo3-cache-persist

Simple persistence for all Apollo Client 3.0 cache implementations, including
InMemoryCache and Hermes.
Supports web and React Native. See all storage providers.
Basic Usage
npm install --save apollo3-cache-persist
or
yarn add apollo3-cache-persist
To get started, simply pass your Apollo cache and an
underlying storage provider to persistCache.
By default, the contents of your Apollo cache will be immediately restored (asynchronously, see how to persist data before rendering), and will be persisted upon every write to the cache (with a short debounce interval).
Examples
React Native
import AsyncStorage from '@react-native-async-storage/async-storage';
import { InMemoryCache } from '@apollo/client/core';
import { persistCache, AsyncStorageWrapper } from 'apollo3-cache-persist';
const cache = new InMemoryCache({...});
// await before instantiating ApolloClient, else queries might run before the cache is persisted
await persistCache({
cache,
storage: new AsyncStorageWrapper(AsyncStorage),
});
// Continue setting up Apollo as usual.
const client = new ApolloClient({
cache,
...
});
Web
import { InMemoryCache } from '@apollo/client/core';
import { persistCache, LocalStorageWrapper } from 'apollo3-cache-persist';
const cache = new InMemoryCache({...});
// await before instantiating ApolloClient, else queries might run before the cache is persisted
await persistCache({
cache,
storage: new LocalStorageWrapper(window.localStorage),
});
// Continue setting up Apollo as usual.
const client = new ApolloClient({
cache,
...
});
See a complete example in the web example.
Contributing
Want to make the project better? Awesome! Please read through our Contributing Guidelines.
Maintainers
We all do this for free... so please be nice 😁.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,531 starspublic-apis/public-apis
A collective list of free APIs
496,813 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
438,831 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,093 stars