edge-flags icon indicating copy to clipboard operation
edge-flags copied to clipboard

Fix logical error in cache eviction

Open sinaa opened this issue 1 year ago • 1 comments

While testing the edge-flags sdk with some unit tests, I came to notice that the cache is never working.

Turned out that this was due to a logical error in the cache eviction condition.

Equality has a higher precedence, and the direction of the validation operation was in the wrong direction (i.e., we want to check if now() has gone past the creation date + ttl).

sinaa avatar Mar 24 '24 12:03 sinaa

@sinaa is attempting to deploy a commit to the Upstash Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 24 '24 12:03 vercel[bot]

You are right, thanks a lot for the fix ❤️

ytkimirti avatar Jun 26 '24 15:06 ytkimirti