key_cacher.go
func (mkc *memoryKeyCacher) Get(keyID string) (*jose.JSONWebKey, error) {
	searchKey, ok := mkc.entries[keyID]
	if ok {
		if mkc.maxKeyAge == MaxKeyAgeNoCheck || !mkc.keyIsExpired(keyID) {
			return &searchKey.JSONWebKey, nil
		}
		return nil, ErrKeyExpired
	}
	return nil, ErrNoKeyFound
}
func (mkc *memoryKeyCacher) Get(keyID string) (*jose.JSONWebKey, error) {
	searchKey, ok := mkc.entries[keyID]
	if ok {
		if mkc.maxKeyAge == MaxKeyAgeNoCheck || !mkc.keyIsExpired(keyID) {
			return &searchKey.JSONWebKey, nil
		}
		return nil, ErrKeyExpired
	}
	return nil, ErrNoKeyFound
}
func ( mkc * memoryKeyCacher ) Get ( keyID string ) ( * jose . JSONWebKey , error ) { searchKey , ok := mkc . entries [ keyID ] if ok { if mkc . maxKeyAge == MaxKeyAgeNoCheck || ! mkc . keyIsExpired ( keyID ) { return & searchKey . JSONWebKey , nil } return nil , ErrKeyExpired } return nil , ErrNoKeyFound }
// Get obtains a key from the cache, and checks if the key is expired
Get obtains a key from the cache and checks if the key is expired