DavidGoodwin / RateLimit

PHP Rate Limiting Library With Token Bucket Algorithm
12 stars 2 forks source link

Clean up expired items. #5

Open vwochnik opened 2 months ago

vwochnik commented 2 months ago

How to clean up expired items?

DavidGoodwin commented 2 months ago

it'd rely on the underlying driver - if you're using redis or memcache they'll just expire.

If you're using a Stash based cache, then you probably need to call clean() or equivalent on the pool every so often (e.g. if it's a filesystem based thing)

vwochnik commented 2 months ago

Thank you! Yes, I am using Stash so I will look into it.