chore: reduce cache ttl
This commit is contained in:
@@ -171,7 +171,7 @@ export class MarkdownController {
|
||||
@Get('/render/:id')
|
||||
@Header('content-type', 'text/html')
|
||||
@HTTPDecorators.Bypass
|
||||
@CacheTTL(60 * 60 * 24)
|
||||
@CacheTTL(60 * 60)
|
||||
async renderArticle(@Param() params: MongoIdDto) {
|
||||
const { id } = params
|
||||
const now = performance.now()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Controller, Get, Header } from '@nestjs/common'
|
||||
import { HttpCache } from '~/common/decorator/cache.decorator'
|
||||
import { CacheTTL, Controller, Get, Header } from '@nestjs/common'
|
||||
import { HTTPDecorators } from '~/common/decorator/http.decorator'
|
||||
import { ApiName } from '~/common/decorator/openapi.decorator'
|
||||
import { ConfigsService } from '../configs/configs.service'
|
||||
@@ -20,7 +19,7 @@ export class PageProxyController {
|
||||
@Get('/qaqdmin')
|
||||
@Header('Content-Type', 'text/html')
|
||||
@HTTPDecorators.Bypass
|
||||
@HttpCache({ disable: true })
|
||||
@CacheTTL(60 * 10)
|
||||
async proxyAdmin() {
|
||||
const {
|
||||
adminExtra,
|
||||
|
||||
@@ -42,7 +42,7 @@ export class ToolController {
|
||||
}
|
||||
|
||||
@Get('geocode/location')
|
||||
@CacheTTL(1000 * 60 * 60 * 24)
|
||||
@CacheTTL(60 * 60 * 24)
|
||||
async callGeocodeLocationApi(@Query() query: GaodeMapLocationDto) {
|
||||
const { latitude, longitude } = query
|
||||
const data = await this.toolService.getGeoLocationByGaode(
|
||||
@@ -52,7 +52,7 @@ export class ToolController {
|
||||
return data
|
||||
}
|
||||
|
||||
@CacheTTL(1000 * 10)
|
||||
@CacheTTL(10)
|
||||
@Get('geocode/search')
|
||||
async callGeocodeSearchApi(@Query() query: GaodeMapSearchDto) {
|
||||
let { keywords } = query
|
||||
|
||||
Reference in New Issue
Block a user