Allow page caching to be toggled

This commit is contained in:
Daniel Nitsikopoulos
2024-10-13 12:49:59 +11:00
parent 27c8470280
commit 9d9828246e
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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