Skip to content

Commit

Permalink
fix: ttl is calculated in seconds (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrederic authored Apr 24, 2024
2 parents 740fd67 + f761cb1 commit be59bef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "realt-properties-map-backend",
"version": "1.0.0",
"version": "1.0.1",
"license": "Apache-2.0",
"main": "src/index.ts",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion backend/src/controllers/properties.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { NextFunction, Request, Response } from "express";

const PropertiesCacheKey = 'properties'

const cachedTime = 1000 * 60 * 60 * 12 // 12 hours
// TTL is in seconds
const cachedTime = 60 * 60 * 12 // 24 hours

export async function get(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>> {
try {
Expand Down

0 comments on commit be59bef

Please sign in to comment.