Skip to content

Commit

Permalink
fix:add additional invalidation for retire pools
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihar committed Aug 12, 2024
1 parent 358609e commit 0211cbc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api-gateway/src/api/service/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -455,6 +456,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -505,6 +507,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -563,6 +566,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -617,6 +621,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -675,6 +680,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -733,6 +739,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -791,6 +798,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -849,6 +857,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -907,6 +916,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down Expand Up @@ -965,6 +975,7 @@ export class ContractsApi {
const invalidedCacheTags = [
`${PREFIXES.CONTRACTS}wipe/requests`,
`${PREFIXES.CONTRACTS}retire/requests`,
`${PREFIXES.CONTRACTS}retire/pools`,
];
await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user));

Expand Down

0 comments on commit 0211cbc

Please sign in to comment.