Skip to content

Commit

Permalink
fix: reduce cache time
Browse files Browse the repository at this point in the history
  • Loading branch information
apalchys committed Jan 10, 2025
1 parent d820fcd commit 143c42e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nestjs/src/courses/courses.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class CoursesService {
}

// every 1h check if there are any courses that are already completed
@Cron(CronExpression.EVERY_HOUR)
@Cron(CronExpression.EVERY_30_MINUTES)
public async exportPublicOpenCounrses() {
const courses = await this.repository.find({
where: {
Expand All @@ -76,7 +76,7 @@ export class CoursesService {
Bucket: this.configService.buckets.cdn,
Key: `app/courses.json`,
Body: JSON.stringify(data),
CacheControl: 'max-age=3600',
CacheControl: 'max-age=1800',
ContentType: 'application/json',
});
}
Expand Down

0 comments on commit 143c42e

Please sign in to comment.