Browse Source

fix: avoid setting ttl to 0 (#9284)

Co-authored-by: mertmit <mertmit99@gmail.com>
pull/9285/head
Raju Udava 3 months ago committed by GitHub
parent
commit
d202157c35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      packages/nocodb/src/filters/global-exception/global-exception.filter.ts

8
packages/nocodb/src/filters/global-exception/global-exception.filter.ts

@ -107,9 +107,13 @@ export class GlobalExceptionFilter implements ExceptionFilter {
(data.timestamp + 300000 - Date.now()) / 1000,
);
NocoCache.setExpiring(cacheKey, data, ttlInSeconds).catch((err) => {
if (ttlInSeconds <= 0) {
NocoCache.setExpiring(cacheKey, data, ttlInSeconds).catch(
(err) => {
this.logger.error(err);
});
},
);
}
// log every 50th request in last 5 minutes after first
if (data.count % 50 === 0) {

Loading…
Cancel
Save