upstash / ratelimit-js

Rate limiting library for serverless runtimes
https://ratelimit-with-upstash.vercel.app/
MIT License
1.72k stars 33 forks source link

Hardcode script hash values and deprecate cacheScripts #120

Closed CahidArda closed 1 month ago

CahidArda commented 1 month ago

Previously, we had the cacheScripts parameter which allowed us to define the script running behavior of the sdk. The two options were:

  1. cacheScripts: true (defaul): load the script to redis on cold start. In the other runs, use the hash with EVALSHA command. Resulted in two round trips in cold start. 2.cacheScripts: false: simply send the script with EVAL command. More bandwidth.

Now, we deprecate the cacheScripts parameter. It no longer has any affect. We also change the two behaviors:

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ratelimit-with-vercel-kv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 10:39am
linear[bot] commented 1 month ago

DX-1116 Ratelimit - script hashing