jellydator / ttlcache

An in-memory cache with item expiration and generics
MIT License
883 stars 115 forks source link

v3.0.1 doesn't have cache.GetOrSet method while it's documented in README.md of master branch #104

Closed mih-kopylov closed 10 months ago

mih-kopylov commented 1 year ago

See https://github.com/jellydator/ttlcache/blob/v3.0.1/cache.go https://github.com/jellydator/ttlcache/blob/master/README.md

Please consider either changing default branch to v3 or make sure README.md in master has relevant documentation.

Bijan-Massoumi commented 1 year ago

BUMP

mmnavarr commented 1 year ago

bump

davseby commented 1 year ago

Everything is correct. To find v3.0.1 documentation you should be looking at this README instead. If you want to use the GetOrSet method before the v3.1.0 release, you can upgrade the package to the latest non-released version via go get github.com/jellydator/ttlcache/v3@master.

mih-kopylov commented 1 year ago

@davseby technically, that's correct, for sure :D

But that misleads developers, since people mostly read README.md when just opening the repo on GitHub.

So if v3 is the main branch, I would consider making v3 a default branch, so that GitHub shows a correct README.md.

Does that make sense?

swithek commented 10 months ago

The default branch is now v3.