eko / gocache

☔️ A complete Go cache library that brings you multiple ways of managing your caches
https://vincent.composieux.fr/article/i-wrote-gocache-a-complete-and-extensible-go-cache-library/
MIT License
2.46k stars 195 forks source link

It's impossible to create my own cache #159

Closed wexder closed 2 years ago

wexder commented 2 years ago

The options struct is not public, so it's not really viable to implement my own cache since I can't use the v3 Option type. Option is just a func that takes private struct as input so I can't use it in my own package. I think the options struct should be public.

wexder commented 2 years ago

I very well might be missing something, so please let me know if I'm wrong.

eko commented 2 years ago

Hi @wexder,

You're totally right, I've just make the options available publicly: https://github.com/eko/gocache/pull/160

You can now implement your own cache store.

Thank you for reporting this issue!

kabelsea commented 2 years ago

Sorry, but this fix didn't solve the problem... all properties in the struct are private!