diff --git a/app/controllers/api/v2/scripts_controller.rb b/app/controllers/api/v2/scripts_controller.rb index 4b83752eb..736109eb7 100644 --- a/app/controllers/api/v2/scripts_controller.rb +++ b/app/controllers/api/v2/scripts_controller.rb @@ -16,7 +16,7 @@ def general_info def ckb_transactions head :not_found and return if @contract.blank? - expires_in 15.seconds, public: true, must_revalidate: true, stale_while_revalidate: 5.seconds + # expires_in 15.seconds, public: true, must_revalidate: true, stale_while_revalidate: 5.seconds @ckb_transactions = if @contract.ckb_transactions_count.zero? CkbTransaction.none diff --git a/config/environments/production.rb b/config/environments/production.rb index dc1864b9e..6f7d414fb 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -103,11 +103,9 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false - # client = Dalli::Client.new(ENV["MEMCACHED_URL"], - # value_max_bytes: 10485760) - # config.action_dispatch.rack_cache = { - # verbose: true, - # metastore: client, - # entitystore: client, - # } + config.action_dispatch.rack_cache = { + verbose: true, + metastore: File.join(ENV["MEMCACHED_URL"], "meta"), + entitystore: File.join(ENV["MEMCACHED_URL"], "body"), + } end