kevburnsjr / microcache

A non-standard HTTP cache implemented as Go middleware
MIT License
155 stars 5 forks source link

Add Ristretto driver #20

Closed erikdubbelboer closed 4 years ago

erikdubbelboer commented 4 years ago

See: https://github.com/kevburnsjr/microcache/issues/19

erikdubbelboer commented 4 years ago

Now people who don't use DriverRistretto still have to pull in the dependencies. Would it be an idea to move all drivers to their own packages so you can only compile/pull what you actually use?

kevburnsjr commented 4 years ago

That's a very common question in this ecosystem. What dependencies shall we natively support??

As I said before, specifying cache size in bytes rather than entries is a primary challenge. You've accomplished this without modifying any existing interfaces.

golang-lru and snappy were inclusions of convenience. Now ristretto is as well.

Anyone using this library is free to challenge the inclusion. I suspect none will take objection.

We should add an example.