Skip to content

Commit

Permalink
remove teams cache
Browse files Browse the repository at this point in the history
only data that isnt subject to change should be
cached for langer than usual (1 sec by default)
  • Loading branch information
Metauriel committed Nov 11, 2024
1 parent c886edd commit 114f20d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/server/src/shared/repo/teams/teams.repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ export class TeamsRepo extends BaseRepo<TeamEntity> {
return TeamEntity;
}

cacheExpiration = 60000;

async findById(id: EntityId, populate = false): Promise<TeamEntity> {
const team = await this._em.findOneOrFail(TeamEntity, { id }, { cache: this.cacheExpiration });
const team = await this._em.findOneOrFail(TeamEntity, { id });

if (populate) {
await Promise.all<void>(
Expand Down

0 comments on commit 114f20d

Please sign in to comment.