Jblew / firebase-functions-rate-limiter

Js/ts library that allows you to set per-time, per-user or per-anything limits for calling Firebase cloud functions
MIT License
100 stars 15 forks source link

feature/Add expireAt field for Firestore Persistence #45

Closed wojteklu closed 8 months ago

wojteklu commented 8 months ago

Motivation / Context

We need the ability to automatically remove entries from Firestore that are no longer in use. Currently, the library does not provide a built-in mechanism to set an expireAt field for Firestore entries. This PR adds expireAt field saved in Firestore that is equal to last usage plus configuration threshold.

Caution: It is stored only in Firestore as RealtimeDb has no support for TTL.

Description

Testing Instructions / How This Has Been Tested

Notes

Documentation