Provide public interface for unmemoized versions of methods
a-chernykh opened this issue · 3 comments
I think it would be nice to have a public functions for unmemoized versions. I know that currently I can use _unmemoized_my_function_name
, but it's name started with _
which makes it kind of private.
Can we remove leading underscore and add the instruction how to call original function in README? I can wrap this into simple PR if my idea make sense.
It's an interesting question.
What's your usecase for wanting to access it unmemoized?
For debugging?
Every memoized function has a (reload) argument you can pass in to bypass and reset the memoization.
eg.
def some_method
Time.now
end
memoize :some_method
calling some_method
will be memoized, but calling some_method(true)
will rememoize each time.
This makes sense and completely covers all my needs. I think I've overlooked this somehow. Thanks for your answer!
cool.