Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Cache perf (#621)
Browse files Browse the repository at this point in the history
* retrival from cache at the top

* setting variable vhAuthToken

* updated var snlAuthToken

* removed variable set before cache update
  • Loading branch information
mjotichmcts authored Sep 1, 2022
1 parent d310f08 commit f2b9f40
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion infrastructure/template/api-op-add-participant-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-create-vh-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-delete-hearing-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-delete-vh-by-id-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-edit-participant-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";
}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-get-reservations-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-get-sessions-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-request-hearing-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
2 changes: 0 additions & 2 deletions infrastructure/template/api-op-update-hearing-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["cftClient"] + "&client_secret=" + (string)context.Variables["cftSecret"] + "&grant_type=client_credentials&scope=profile";}</set-body>
</send-request>
<set-variable name="cftAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["cftBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="cftAuth" value="@("Bearer " + (String)((IResponse)context.Variables["cftBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down Expand Up @@ -80,7 +79,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-update-listing-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<set-body>@{
return "username=" + (string)context.Variables["snlClient"] + "&password=" + (string)context.Variables["snlSecret"] + "&grant_type=password_credentials";}</set-body>
</send-request>
<set-variable name="snlAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" />
<cache-store-value key="snlAuth" value="@("Bearer " + (String)((IResponse)context.Variables["snlBearerToken"]).Body.As<JObject>()["idToken"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-update-vh-by-id-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
1 change: 0 additions & 1 deletion infrastructure/template/api-op-vh-clone-hearing-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<set-body>@{
return "client_id=" + (string)context.Variables["vhClient"] + "&client_secret=" + (string)context.Variables["vhSecret"] + "&grant_type=client_credentials&resource=#{vhHost}#";}</set-body>
</send-request>
<set-variable name="vhAuthToken" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" />
<cache-store-value key="vhAuth" value="@("Bearer " + (String)((IResponse)context.Variables["vhBearerToken"]).Body.As<JObject>()["access_token"])" duration="2700" />
</when>
</choose>
Expand Down

0 comments on commit f2b9f40

Please sign in to comment.