[performance] cached oauth database types (#2838)

* update token + client code to use struct caches

* add code comments

* slight tweak to default mem ratios

* fix envparsing

* add appropriate invalidate hooks

* update the tokenstore sweeping function to rely on caches

* update to use PutClient()

* add ClientID to list of token struct indices
This commit is contained in:
kim
2024-04-15 14:22:21 +01:00
committed by GitHub
parent 8b30709791
commit f79d50b9b2
18 changed files with 428 additions and 67 deletions

View File

@ -19,7 +19,5 @@ package oauth
import "github.com/superseriousbusiness/oauth2/v4/errors"
// InvalidRequest returns an oauth spec compliant 'invalid_request' error.
func InvalidRequest() error {
return errors.New("invalid_request")
}
// ErrInvalidRequest is an oauth spec compliant 'invalid_request' error.
var ErrInvalidRequest = errors.New("invalid_request")