diff --git a/lib/memery.rb b/lib/memery.rb index 2c0ad25..c2e4c66 100644 --- a/lib/memery.rb +++ b/lib/memery.rb @@ -80,7 +80,7 @@ def define_memoized_method!(klass, method_name, condition: nil, ttl: nil) end cache_store = (@_memery_memoized_values ||= {}) - cache_key = original_arity.zero? ? method_key : [method_key, *args] + cache_key = original_arity.zero? ? method_key : [method_key, *args].hash cache = cache_store[cache_key] return cache.result if cache&.fresh?(ttl)