Commit bd6bbede authored by nanahira's avatar nanahira

cache control

parent a1201a54
Pipeline #14541 passed with stages
in 4 minutes and 1 second
import { Controller } from '@nestjs/common'; import { Controller, Header } from '@nestjs/common';
import { CrudFactory } from '../decorators/crud.decorators'; import { CrudFactory } from '../decorators/crud.decorators';
import { BlacklistAccount } from '../entities/blacklist-account.entity'; import { BlacklistAccount } from '../entities/blacklist-account.entity';
import { BlacklistAccountService } from './blacklist-account.service'; import { BlacklistAccountService } from './blacklist-account.service';
...@@ -13,6 +13,10 @@ export class BlacklistAccountController { ...@@ -13,6 +13,10 @@ export class BlacklistAccountController {
) {} ) {}
@dec.findAll() @dec.findAll()
@Header(
'Cache-Control',
'public, max-age=600, stale-while-revalidate=600, stale-if-error=604800',
)
findAll(@dec.findAllParam() param: UpdateDto) { findAll(@dec.findAllParam() param: UpdateDto) {
return this.blacklistAccountService.findAll(param); return this.blacklistAccountService.findAll(param);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment