This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 8a9934a9d9fc98b56c4566ae2e3fd4d83e505d3e
tree fe7ed2626140178c722f5245d37b23c311da5ce4
parent d27dd860c7f4f9b9e5aebe7d0c6e9b6108d8717c
tree fe7ed2626140178c722f5245d37b23c311da5ce4
parent d27dd860c7f4f9b9e5aebe7d0c6e9b6108d8717c
... |
... |
|












Is the inconsistency between memoize (the usage I am used to and used in the file name and the module name) and memorize (the actual call) intentional?
It was fixed in 001c8beb4
why doesn’t it use alias_method_chain? or atleast the same structure of aliasing.
with this we get a non-standard name for the function that bypasses memoizing.
I’d also want a .blah(true) which would force reload
I have previously implemented the memoize feature as method_cache plugin at http://github.com/humanzz/method_cache. But method_cache had a couple more features: in addition to caching results in instance variables it also stored the result in the cache store. It’d be great if memoize adds such feature.
@matthewruby I’m trying to avoid alias_method_chain. But if access to the original method is important, maybe we could name it “name_without_memoization”.
@humanzz No to RAILS_CACHE. Most of time you a memorizing simple string manipulations or integer calculations. They are either short lived and should die with the object or long live and you want to deal with the memcache protocol latency.
Very valuable addition, definitely needed to go in as a separate module while patches that fix 500 problem with Nginx proxying get dusty.
and I like the way alias method chain is avoided here.
and I like the way alias method chain is avoided here.
BTW, this is module is NOT include anywhere by default. To use it include ActiveSupport::Memoizable
As far as implementations go, this is alright, but there doesn’t appear to be a simple way to reload the data. Personally, I like Marcel Molina’s implementation of this same feature in the AWS-S3 library.
I didn’t realize that amount of people who would be using this outside of core. I added a few of your requests.
http://github.com/rails/rails/commit/e1f23da53cef20a60e4bf458d959fe2bfe7d52ea