mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
set cache if not exists
This commit is contained in:
parent
51d5166321
commit
8acdea5002
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ export const cacheFetchResult = async (fetchResult: FetchResult) => {
|
|||
const ttl = 4 * 60 * 60
|
||||
const key = `fetch-result:${fetchResult.finalUrl}`
|
||||
const value = JSON.stringify(fetchResult)
|
||||
return redisDataSource.cacheClient.set(key, value, 'EX', ttl)
|
||||
return redisDataSource.cacheClient.set(key, value, 'EX', ttl, 'NX')
|
||||
}
|
||||
|
||||
export const contentFetchRequestHandler: RequestHandler = async (req, res) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue