mloughran / api_cache

Simple library which makes it easy to add caching to all your external API calls.
http://mloughran.github.com/api_cache/
MIT License
360 stars 29 forks source link

Added to redis support: clear, count, key(pattern), expire(key, time) #19

Closed NullVoxPopuli closed 9 years ago

NullVoxPopuli commented 9 years ago

the redis_store spec passes.

mloughran commented 9 years ago

I'm afraid this makes rather too many changes to the expected interface for the redis special case for me to be comfortable merging. Some of the implementations are extremely dangerous (such as the use of FLUSHALL – clearing all redis dbs), which is just asking for trouble.

A redis store may well make sense, but I don't think this is the solution. For now it's perfectly possible to use a dalli store for redis.

NullVoxPopuli commented 9 years ago

i think most cache features should be implemented in the interface, it's pretty limiting now.

mloughran commented 9 years ago

I do agree, the interface is pretty limited, but I think this needs some more thought.