Browse Source

Expire cache entries immediately in case of errors

pull/4099/head
Thomas Kaul 9 months ago
parent
commit
a8c2fa31dd
  1. 4
      apps/api/src/services/queues/portfolio-snapshot/portfolio-snapshot.processor.ts

4
apps/api/src/services/queues/portfolio-snapshot/portfolio-snapshot.processor.ts

@ -86,7 +86,9 @@ export class PortfolioSnapshotProcessor {
const expiration = addMilliseconds(
new Date(),
this.configurationService.get('CACHE_QUOTES_TTL')
snapshot.errors.length === 0
? this.configurationService.get('CACHE_QUOTES_TTL')
: 0
);
this.redisCacheService.set(

Loading…
Cancel
Save