class Example1 include StaleIfSlow::API stale_if_slow :save stale_if_slow find: lambda {"key"} stale_if_slow find_all: ::Generator def save arg; end def find arg=nil; end def find_all; end end class Example2 include StaleIfSlow::API stale_if_slow :save, :save, :save, :save end class Example3 include StaleIfSlow::API stale_if_slow find_one: { timeout: 0.1, content_timeout: 30.seconds, stale_content_timeout: 5.minutes } stale_if_slow find_two: { timeout: 0.1, key: ::Generator } def find_one; end def find_two; end end