Rails has recently introduced an identity map feature that ensures that models are loaded only once in a request. This is really useful to maintain consistency, it means you never get multiple instances of the same model floating around in the same request, so it can save a lot of resources if used properly.
I've added a quick implementation here:
https://github.com/p...ter/identitymap
It'd be really nice to have this in the core (although it should be disabled by default). I already opened a feature request for it, but I don't think Qiang sees the advantages of it yet. Does anyone else have any thoughts on the matter?
Page 1 of 1
IdentityMap feature for Active Record
#2
Posted 21 September 2011 - 03:50 AM
And the issue for this is on this link - http://code.google.c...tail?id=2817#c0
Find more about me.... btw. Do you know your WAN IP?
#3
Posted 13 March 2012 - 02:14 PM
Is there any chance this is going to be reconsidered for Yii 2.0? A similar issue has been closed, stating that Yii now supports query caching. But I think query caching solves other problems than an identity map does.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
#4
Posted 15 March 2012 - 11:40 AM
When we'll show Yii2 code to community you'll be able to test memory consumption to determine if it is necessary.
#5
Posted 15 March 2012 - 11:56 AM
Yes, certainly. But this doesn't really answer my question
I take it IMs are open for discussion again?
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
#7
Posted 16 March 2012 - 01:57 PM
Identity Maps?
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
Share this topic:
Page 1 of 1

Help














