module GraphQL::FragmentCache::Railtie::Config

Provides Rails-specific configuration, accessible through `Rails.application.config.graphql_fragment_cache`

Public Class Methods

store=(store) click to toggle source
# File lib/graphql/fragment_cache/railtie.rb, line 12
def store=(store)
  # Handle both:
  #   store = :memory
  #   store = :mem_cache, ENV['MEMCACHE']
  if store.is_a?(Symbol) || store.is_a?(Array)
    store = ActiveSupport::Cache.lookup_store(store)
  end

  FragmentCache.cache_store = store
end