identity_cache
identity_cache copied to clipboard
An option to skip should_use_cache? method
I've just found that if a query is wrapped inside a transaction, IdentityCache will call the database directly
https://github.com/Shopify/identity_cache/blob/8fcaa32633bb3406c01adc32147a0e0c85aff56b/lib/identity_cache.rb#L151
However, in my case, there are some models doesn't need this (read a lot and rarely write)
Is there an option to skip this feature? Eg:
class TestModel < ApplicationRecord
include IdentityCache
skip_transaction: true
end