When implementing some helper methods, sometimes, I want to store some computed result somewhere accessible from the helper method as a cache.
If I store it into instance variable, it will pollute instances, so it looks like not wise to do that.
Any good place to store such value?
Or doing such heavy weight computing in a helper is a bad idea?
Sometimes I use Rails cache to store this kind of values. The code is like this,