Skip to content

Commit

Permalink
Fix: TypeError: can't dump anonymous class
Browse files Browse the repository at this point in the history
  • Loading branch information
khiav223577 committed Sep 23, 2019
1 parent 853a091 commit 6ae1b73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/lib/rails_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def exist?(key)
end

def write(key, val, options = {})
ActiveSupport::Notifications.instrument('cache.active_record', sql: "write cache at #{key} with val: #{val}")
@cache[key] ||= { data: Marshal.dump(val), expired_at: Time.now + 30.minutes }
ActiveSupport::Notifications.instrument('cache.active_record', sql: "write cache at #{key} with val: #{val}")
return val
end

Expand Down

0 comments on commit 6ae1b73

Please sign in to comment.