Skip to content

Commit

Permalink
Add proposal/tally caching and durations
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed Jul 11, 2022
1 parent 8f6c915 commit dbc062a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions proxy/proxyController.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ const { createProxyServer } = httpProxy;

const CACHED_REQUESTS = [
{
path: 'cosmos/staking/v1beta1/validators',
maxAge: 2 * 60
path: 'cosmos/staking/v1beta1/validators$',
maxAge: 60
},
{
path: 'cosmos/gov/v1beta1/proposals$',
maxAge: 60
},
{
path: 'cosmos/gov/v1beta1/proposals/[\\d]*/tally$',
maxAge: 60
},
{
path: 'cosmos/authz/v1beta1/grants',
Expand All @@ -31,11 +39,11 @@ const CACHED_REQUESTS = [
},
{
path: new RegExp("cosmos/staking/v1beta1/validators/[\\w\\d]*/delegations$"),
maxAge: 60
maxAge: 30
},
{
path: new RegExp("cosmos/distribution/v1beta1/delegators/[\\w\\d]*/withdraw_address$"),
maxAge: 5 * 60
maxAge: 60
}
]

Expand Down

0 comments on commit dbc062a

Please sign in to comment.