fix mute cache expiration
This commit is contained in:
parent
8f033d9b89
commit
5ee1621845
1 changed files with 2 additions and 2 deletions
|
|
@ -261,7 +261,7 @@ export class CacheService implements OnApplicationShutdown {
|
|||
});
|
||||
|
||||
this.userMutingsCache = this.cacheManagementService.createQuantumKVCache<Set<string>>('userMutings', {
|
||||
lifetime: 1000 * 60 * 30, // 3m (workaround for mute expiration)
|
||||
lifetime: 1000 * 60 * 3, // 3m (workaround for mute expiration)
|
||||
fetcher: async muterId => {
|
||||
const mutings = await this.mutingsRepository.find({ where: { muterId: muterId }, select: ['muteeId'] });
|
||||
return new Set(mutings.map(muting => muting.muteeId));
|
||||
|
|
@ -283,7 +283,7 @@ export class CacheService implements OnApplicationShutdown {
|
|||
});
|
||||
|
||||
this.userMutedCache = this.cacheManagementService.createQuantumKVCache<Set<string>>('userMuted', {
|
||||
lifetime: 1000 * 60 * 30, // 3m (workaround for mute expiration)
|
||||
lifetime: 1000 * 60 * 3, // 3m (workaround for mute expiration)
|
||||
fetcher: async muteeId => {
|
||||
const mutings = await this.mutingsRepository.find({ where: { muteeId }, select: ['muterId'] });
|
||||
return new Set(mutings.map(muting => muting.muterId));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue