Merge lp:~jameinel/juju-core/cache-facade-instances into lp:~go-bot/juju-core/trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~jameinel/juju-core/cache-facade-instances |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~jameinel/juju-core/api-srvRoot-ensures-type |
Diff against target: |
178 lines (+105/-28) 3 files modified
state/apiserver/export_test.go (+5/-4) state/apiserver/root.go (+40/-24) state/apiserver/root_test.go (+60/-0) |
To merge this branch: | bzr merge lp:~jameinel/juju-core/cache-facade-instances |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+220937@code.launchpad.net |
Description of the change
state/apiserver
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.
Unmerged revisions
- 2760. By John A Meinel
-
A good thing we added a test, because we weren't actually caching anything. :)
So now we have a proper test case that we can see the objects are
getting cached and reused. - 2759. By John A Meinel
-
Merged api-srvRoot-
ensures- type into cache-facade- instances. - 2758. By John A Meinel
-
Merged api-srvRoot-
ensures- type into cache-facade- instances. - 2757. By John A Meinel
-
Merged api-srvRoot-
ensures- type into cache-facade- instances. - 2756. By John A Meinel
-
Merged api-srvRoot-
ensures- type into cache-facade- instances. - 2755. By John A Meinel
-
Merged api-srvRoot-
ensures- type into cache-facade- instances. - 2754. By John A Meinel
-
merge up the change to ensure the expectedType of Facade objects.
- 2753. By John A Meinel
-
Merge in api-registry-
tracks- type, resolve conflict - 2752. By John A Meinel
-
Use a generic object cache keyed on facade name and version.
- 2751. By John A Meinel
-
Merge api-use-
register- standard- facade.
Reviewers: mp+220937_ code.launchpad. net,
Message:
Please take a look.
Description: /root.go: cache active facades
state/apiserver
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: /code.launchpad .net/~jameinel/ juju-core/ api-srvRoot- ensures- type/+merge/ 220615
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/96600043/
Affected files (+107, -28 lines): /export_ test.go /root.go /root_test. go
A [revision details]
M state/apiserver
M state/apiserver
M state/apiserver