Descriptionstate/apiserver/root.go: cache active facades
Since I made Client no longer special, it was now being created again
for every request, which is a bit inefficient. However, since we now
have a centralized location where requests go through, it is pretty easy
to add caching there. And now all Facades are cached. It even comes with
a test that we don't create new objects for the same (Name, version)
couple, but we do create a different one when version changes.
https://code.launchpad.net/~jameinel/juju-core/cache-facade-instances/+merge/220937
Requires: https://code.launchpad.net/~jameinel/juju-core/api-srvRoot-ensures-type/+merge/220615
(do not edit description out of merge proposal)
Patch Set 1 #
MessagesTotal messages: 2
|