Skip to content

Commit

Permalink
Merge pull request #2153 from zmcNotafraid/hotfix-script-tx
Browse files Browse the repository at this point in the history
hotfix: commit script txs cache
  • Loading branch information
zmcNotafraid authored Aug 27, 2024
2 parents 3df06e4 + 411430d commit 1fb20e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v2/scripts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1fb20e2

Please sign in to comment.