Skip to content

Commit

Permalink
pref:cache result netdisk overview desc api ttl set 3600
Browse files Browse the repository at this point in the history
  • Loading branch information
hackycy committed Jun 23, 2021
1 parent ef2c2fb commit 43a6f9e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/modules/admin/netdisk/overview/overview.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Get } from '@nestjs/common';
import {
CacheInterceptor,
CacheKey,
CacheTTL,
Get,
UseInterceptors,
} from '@nestjs/common';
import {
ApiOkResponse,
ApiOperation,
Expand All @@ -17,6 +23,9 @@ import { NetDiskOverviewService } from './overview.service';
export class NetDiskOverviewController {
constructor(private overviewService: NetDiskOverviewService) {}

@CacheKey('netdisk_overview_desc')
@CacheTTL(3600)
@UseInterceptors(CacheInterceptor)
@ApiOperation({ summary: '获取网盘空间数据统计' })
@ApiOkResponse({ type: OverviewSpaceInfo })
@PermissionOptional()
Expand Down

0 comments on commit 43a6f9e

Please sign in to comment.