graphql-cache icon indicating copy to clipboard operation
graphql-cache copied to clipboard

Cache miss: (GraphQL::Cache:Tag:title:Tag:tags/10-20190522154014980856)

Open afuno opened this issue 6 years ago • 2 comments
trafficstars

I tried to cache the title:

class Types::TagType < Types::BaseObject
  field :id, ID, null: false
  field :title, String, null: false, cache: true
end

But in the console I get a lot of messages of this type:

Cache miss: (GraphQL::Cache:Tag:title:Tag:tags/10-20190522154014980856)

How to fix it?

afuno avatar Jun 06 '19 17:06 afuno

Those are debug level log messages that the gem emits for easy distinction of what resolved the field in question. You can eliminate the messages by setting your Rails log level to something higher than DEBUG. That's assuming your question is just about the log messages themselves. If you're having issues with the cache always missing that's another issue. Does the message persist on the second resolution of the field (i.e. run the query in the console again)? Or does it say Cache hit: (GraphQL::Cache:Tag:title:Tag:tags/10-20190522154014980856)

thebadmonkeydev avatar Jul 24 '19 00:07 thebadmonkeydev

@afuno Did my previous comment answer your question?

thebadmonkeydev avatar Oct 22 '19 16:10 thebadmonkeydev