3 4 5 6 7 8 9 10 11
# File 'lib/stacks/cache.rb', line 3 def get_value(item, backend, ttl) return item.value if Stacks.deactivate if Stacks.restrict return item.value unless Stacks.restrict.call end backend.get_or_set(item, ttl) end