Comments (5)
Hi, in case something wrong with the cache you can change cache key by setting new structureVersion, so it will use a new one and old cache will just expire.
Initially, I was using package version as a key prefix but we want to keep cache key the same every time we release to production. And only change it when we really have to.
from apollo-server-redis-cache.
All right ,but I really think that structureVersion
if it can be define in my own config maybe better ? ranther than in package.json
file ?
from apollo-server-redis-cache.
yes you can set your key in the initialization of the cache
const cahce = new apolloServerRedisCache({ cache: true, key: 'asrc'})
from apollo-server-redis-cache.
I know it , but I dislike to use structureVersion
in redis key name . There is a risk that if you change structureVersion
in package.json
file, my new server use npm i
and get new structureVersion
word. that's a big problem.
from apollo-server-redis-cache.
Could you please explain why this is a big problem?
And please if you want you can always send PR
from apollo-server-redis-cache.
Related Issues (2)
- caching for subscription HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-server-redis-cache.