We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9df5a82 commit d7ecea9Copy full SHA for d7ecea9
lib/upstash.ts
@@ -113,7 +113,10 @@ export async function setLastCheckedId(id: number) {
113
}
114
115
export async function checkIfPostWasChecked(id: number) {
116
- /* Check if a post has been checked in redis – if setting the key for the post returns null, it means it's already been set */
+ /* Check if a post has been checked in redis –
117
+ if setting the key for the post returns null, it means it's already been set
118
+ Here, we're setting the keys to expire in 24 hours
119
+ */
120
return (
121
(await redis.set(`post_${id}`, true, { nx: true, ex: 24 * 60 * 60 })) ===
122
null
0 commit comments