http://helma.org/bugs/show_bug.cgi?id=623 Summary: hop.get(name) doesn't use cache
Product: Helma
Version: 1.6.2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P1
Component: Database Layer
AssignedTo:
helma-dev@...
ReportedBy:
joshua-helma@...
I've set loadmode = aggressive on a collection, and the first time I use
get(#), it fetches the full contents of the entire list and uses the cache for
subsequent get(#) calls. (I can tell because I'm logging SQL queries.)
But every time I call get(name), a new DB query is run to retrieve the child
with the matching accessname. I would expect the cache to handle this case as
well.
The collection, of course, is configured with an accessname.
I've worked around this with a new HopObject method I made analogous to
.list():
HopObject.prototype.hash = function(keyname) {
var hash = {};
this.forEach(function(h){ hash[h[keyname]] = h; });
return hash;
}
Obviously the above assumes that you've already added forEach to HopObject,
which I have.
--
Configure bugmail:
http://helma.org/bugs/userprefs.cgi?tab=email------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev