mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-23 14:26:47 +09:00
Keep transaction guards temporary and simplify quick boost forms
This commit is contained in:
1 parent
a9007010c1
commit
a0d72938f3
5 files changed
+39
-8
No files matched your search
@@ -2,7 +2,7 @@
|
||||
# The observer must still see the captured epoch after lookup and admission.
|
||||
class RecordCache
|
||||
def self.fetch(key, version)
|
||||
return yield unless version && ResponseCache.instance.budget.positive? && !ActiveRecord::Base.connection_pool.active_connection?&.transaction_open?
|
||||
return yield unless version && ResponseCache.instance.budget.positive? && !FragmentCache.transaction_open?
|
||||
|
||||
key = ActiveSupport::Cache.expand_cache_key([ "record-snapshot-v1", version, key ])
|
||||
return yield if key.bytesize > ResponseCache::MAX_KEY_BYTES
|
||||
|
||||
Reference in new issue
Block a user