go-pkgz / lcw

Loading Cache Wrapper
https://go-pkgz.umputun.dev/lcw/
MIT License
20 stars 5 forks source link

Add v2 with generics #43

Closed paskal closed 6 months ago

paskal commented 6 months ago

Redis cache creation will return an error if used with a type which is not a string or not based on a string.

Resolves #31 and #39.

umputun commented 6 months ago

Looking good. I'm not a big fan of using reflection for Redis, but it's likely the right approach in this situation. Please ping me once you're done with everything, and I'll take a closer look.

paskal commented 6 months ago

@umputun, everything is ready for review. It took some time for me to figure out how to combine two coverage profiles into one for a proper coverage report.

paskal commented 6 months ago

The Redis problem seems to be https://github.com/redis/go-redis/issues/2914. It should be fixed upstream, as it affects a lot of cases.