davedevelopment / stiphle

A simple PHP library for throttling or rate limiting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is the APC storage persistent across requests?

CMCDragonkai opened this issue · comments

When instantiating the leaky bucket, it uses the Process storage which I think is just memory based.

I need a leaky bucket for a RESTful API, so the storage is persistent across requests. I haven't use APC much, so I wonder if that is persistent?

Yes it is, though it's only really a cache, so it wont survive web server restarts. If you want something fast and more permanent, I'd recommend something like Redis.

Sure, but there isn't a Redis adapter?

Not yet (sorry!), but the interface is very narrow and wouldn't take long to write one