Giter VIP home page Giter VIP logo

Comments (5)

bderen avatar bderen commented on August 14, 2024

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.

zjyonline avatar zjyonline commented on August 14, 2024

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.

bderen avatar bderen commented on August 14, 2024

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.

zjyonline avatar zjyonline commented on August 14, 2024

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.

bderen avatar bderen commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.