davedevelopment / stiphle

A simple PHP library for throttling or rate limiting
MIT License
247 stars 38 forks source link

Is the APC storage persistent across requests? #1

Open CMCDragonkai opened 10 years ago

CMCDragonkai commented 10 years ago

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?

davedevelopment commented 10 years ago

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.

CMCDragonkai commented 10 years ago

Sure, but there isn't a Redis adapter?

davedevelopment commented 10 years ago

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