Giter Club home page Giter Club logo

Comments (3)

justin808 avatar justin808 commented on June 17, 2024 1

Ahh! I see: https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/blob/4e35f6e03863306d526438f4fc84d1b7c730d8d5/lib/graphql/fragment_cache/railtie.rb

from graphql-ruby-fragment_cache.

DmitryTsepelev avatar DmitryTsepelev commented on June 17, 2024

Hi @justin808! The gem does not have a rails dependency, and cache store is a black box for us. If config.active_record.cache_versioning = true setting takes care of everything then yes, we do support it 🙂

from graphql-ruby-fragment_cache.

justin808 avatar justin808 commented on June 17, 2024

Rails.cache is an abstraction layer on top of the low-level cache, so if you don't have a Rails dependency on

https://github.com/rails/rails/blob/main/activesupport/lib/active_support/cache.rb#L226-L373

Then you're not using it.

  1. If you convert the key into a string using join, you prevent the Rails cache store from breaking apart the versioning (like timestamp) from the object id.
    https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/blob/master/lib/graphql/fragment_cache/cache_key_builder.rb#L128-L134

However, I just saw the file:
https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/blob/master/lib/graphql/fragment_cache/rails/cache_key_builder.rb

Can you point us to the parts where this gets wired up to use Rails?

from graphql-ruby-fragment_cache.

Related Issues (20)

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.