You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimize consume of KV read, write & delete operation
Fixes#1
Minimize KV read, write, and delete operation consumption to make it more suitable for the free plan.
* **In-memory cache**: Add `statsCache` and `rateLimitCache` to store stats and rate limit data in memory.
* **Initialize stats**: Cache stats in memory to avoid repeated KV reads in the `initializeStats` function.
* **Stats middleware**: Batch updates to the stats and write them to the KV store periodically instead of on every request.
* **Rate limiting middleware**: Cache rate limit data in memory to avoid repeated KV reads and writes in the `checkRateLimit` function. Use a single KV read and write operation per request.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/arcestia/domainchecker/issues/1?shareId=XXXX-XXXX-XXXX-XXXX).
0 commit comments