Class: Rails::GraphQL::CacheKey

Inherits:
Struct
  • Object
show all
Defined in:
lib/rails/graphql.rb

Overview

Helper class to produce a ActiveSupport-compatible versioned cache key

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cache_keyObject

Returns the value of attribute cache_key

Returns:

  • (Object)

    the current value of cache_key



64
65
66
# File 'lib/rails/graphql.rb', line 64

def cache_key
  @cache_key
end

#cache_versionObject

Returns the value of attribute cache_version

Returns:

  • (Object)

    the current value of cache_version



64
65
66
# File 'lib/rails/graphql.rb', line 64

def cache_version
  @cache_version
end

Instance Method Details

#inspectObject



65
66
67
# File 'lib/rails/graphql.rb', line 65

def inspect
  cache_version ? +"#{cache_key}[#{cache_version}]" : cache_key
end