second_level_cache icon indicating copy to clipboard operation
second_level_cache copied to clipboard

Write Through and Read Through caching library inspired by CacheMoney and cache_fu, support ActiveRecord 4, 5 and 6.

Results 5 second_level_cache issues
Sort by recently updated
recently updated
newest added

Could you please remove or update this link: https://github.com/hooopo/second_level_cache/blob/master/README.md?plain=1#L175

```ruby user = User.create(name: "test", email: "[email protected]") user1 = User.fetch_by_uniq_keys(id: user.id) user2 = User.fetch_by_uniq_keys(id: user.id) user1.update_attribute(:name, "user1") user2.update_attribute(:email, "[email protected]") user_from_cache = User.fetch_by_uniq_keys(id: user.id) user_from_database = User.without_second_level_cache { User.find(user.id) } assert_equal...

```ruby class Animal < ApplicationRecord self.ignored_columns = [:name] end class Dog < Animal self.ignored_columns = [] end def test_sti_ignored_columns_not_match animal = Animal.create(name: "Dog", type: "Dog") animal.expire_second_level_cache Animal.find(animal.id) assert_equal "Dog", Animal.fetch_by_uniq_keys(id:...

执行 rails console 会报下面错,ps: 调用占是从上往下。初步定位是 descends_from_active_record? 方法 STI 检查时 load_schema, 这时数据库还没创建就报错了。 Gem 2.4.1 Rails 5.2.0 Ruby 2.5.0 ``` 24: from /Users/basten/.rvm/gems/ruby-2.5.0/gems/second_level_cache-2.4.1/lib/second_level_cache/mixin.rb:17:in `second_level_cache' 23: from /Users/basten/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.0/lib/active_record/core.rb:286:in `relation' 22: from /Users/basten/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.0/lib/active_record/inheritance.rb:84:in `finder_needs_type_condition?'...

升级到 Rails 8 之后出现错误 ```sh /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/second_level_cache-2.7.1/lib/second_level_cache/active_record/belongs_to_association.rb:7:in `find_target': wrong number of arguments (given 1, expected 0) (ArgumentError) from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/association.rb:190:in `load_target' from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/association.rb:76:in `reload' from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/singular_association.rb:11:in `reader' from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/builder/association.rb:105:in `xml' ``` 看起来是因为...