robfig/revel — pull request #346 by mattbaird (2013-10-10 22:56:29+00:00)
Title: working, tested Redis (2.6.X) cache engine implementation

Hi Rob,

I read on the google group that Redis was requested for a Cache implementation and since I wanted it as well I went ahead and did it. I copied the tests from memcached and pointed them at the Redis implementation.

I thought about doing a groupcache implementation, however the cache contract for Revel precludes it from being an option (no evictions, no expiration).

I wrote the configuration in a way that it is backward compatible, includes error handling if the user gets the configuration in an invalid format, and will provide documentation shortly.

I fixed a couple typos in cache_test.go for the error message return type and I had to change the sleep calls slightly as I found Redis seems to be either so fast that it's happening in the same second :) or it's a redis bug. Happy to discuss other potential fixes.

I ran all the tests with both memcached and redis. Since you aren't a redis guy, if you want a quick way to run a redis server and you have docker installed:

```bash
sudo docker run -p 6379:6379 crsmithdev/redis2.6
```

If you don't have docker installed.... get docker!

cheers & thanks,
m