go-redis / cache

Cache library with Redis backend for Golang
https://redis.uptrace.dev/guide/go-redis-cache.html
BSD 2-Clause "Simplified" License
757 stars 95 forks source link

[feature-request] Exporting default Marshal/Unmarshal methods #61

Open dhh93 opened 3 years ago

dhh93 commented 3 years ago

Was wondering if we could export the default _marshal and _unmarshal methods. I wanted to implement a custom Marshal and Unmarshal method for specific types, but fall back on the default method for everything else.

Happy to submit a PR to help implement. Appreciate the great work on this & the core library

vmihailenco commented 3 years ago

DefaultMarshal/DefaultUnmarshal? :)

I will accept the PR, but my recommendation is to fork the lib into your project and do the changes you need there. That is what I do.