2021-04-21 20:27:39 +02:00
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma.service';
|
2021-04-13 21:53:58 +02:00
|
|
|
import { Injectable } from '@nestjs/common';
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class CacheService {
|
|
|
|
public constructor(private prisma: PrismaService) {}
|
|
|
|
|
|
|
|
public async flush(aUserId: string): Promise<void> {
|
|
|
|
await this.prisma.property.deleteMany({
|
|
|
|
where: {
|
|
|
|
OR: [{ key: 'LAST_DATA_GATHERING' }, { key: 'LOCKED_DATA_GATHERING' }]
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|