Allow page caching to be toggled
This commit is contained in:
@@ -77,7 +77,7 @@ module Adamantium
|
||||
|
||||
setting :gist_client_token, default: nil
|
||||
|
||||
setting :cache_pages, default: true
|
||||
setting :cache_pages, default: false
|
||||
setting :steam_api_key, default: nil
|
||||
setting :steam_user_id, default: nil
|
||||
end
|
||||
|
@@ -7,7 +7,7 @@ module Adamantium
|
||||
|
||||
def call(key:, params:, content_proc:, expiry:)
|
||||
calculated_key = "adamantium:#{key}_#{params.join("_")}"
|
||||
cached_content = cache_store.read(key: calculated_key)
|
||||
cached_content = cache_store.read(key: calculated_key) if settings.cache_pages
|
||||
|
||||
return cached_content if cached_content
|
||||
|
||||
|
Reference in New Issue
Block a user