Skip to content

Commit

Permalink
Merge branch 'hotfix/fix-cache-age'
Browse files Browse the repository at this point in the history
  • Loading branch information
ITJesse committed Nov 13, 2023
2 parents b1b752b + 1555c87 commit 886a0f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "image-optimizer",
"version": "1.2.0",
"version": "1.2.1",
"main": "index.js",
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class Cache {
redisClient.zincrby('cache_access_count', 1, this.key),
this.cacheLocker.unlock(),
])
return [filePath, Date.now() - parseInt(timestamp)]
return [filePath, Math.floor((Date.now() - parseInt(timestamp)) / 1000)]
}

set = (data: PassThrough) =>
Expand Down

0 comments on commit 886a0f7

Please sign in to comment.