|
|
|
|
|
by losvedir
4420 days ago
|
|
Funny! I actually came across this article yesterday when trying to look into the current state of Ruby's global method cache. I had a question about the write-up, so maybe I can ask it here! The page says: > This is now no longer an issue, Ruby 2.1 uses a method cache based on the class hierarchy, invalidating the cache for only the class in question and any subclasses. How does this work with an instance of a class? Does it invalidate only that instance's method cache, or all instances in that class? If I do DCI-style: @user.extend(PasswordConfirmable)
Does that blow away the cache for all User instances, or just that one? |
|
That class is below `User` in the hierarchy: