go-pkgz / lcw

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

Add a universal constructor with some URI #6

Closed umputun closed 4 years ago

umputun commented 4 years ago

The goal is to pass some URI, like redis://127.0.0.1:123?max=12&ttl=60s or mem://lru?fo-bar and get back fully constructed cache.

Such functionality may simplify client code supporting multiple cache configuration. In fact, it will move the switch from the client-side to lcw package and minimize the number of params client has to provide & maintain (a single url instead of multiple params).