Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An option to skip should_use_cache? method #521

Open
dotai2012 opened this issue Aug 26, 2022 · 0 comments
Open

An option to skip should_use_cache? method #521

dotai2012 opened this issue Aug 26, 2022 · 0 comments

Comments

@dotai2012
Copy link

dotai2012 commented Aug 26, 2022

I've just found that if a query is wrapped inside a transaction, IdentityCache will call the database directly

if should_use_cache?

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant