Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with cached keys in special cases (#12)
### Fixed - In rare conditions the cache used by a `Provider` could return old data from another no longer existing `Provider`. This was seen in some unit tests that created a lot of `AsyncKeyFetcher` instances which created a lot of `Provider` instances. The main reason to the problem was that the `aiocache` library would create the cache key using a string like `<pyjwt_key_fetcher.provider.Provider object at 0x120e9a070>` that then got reused by a new instance occupying the same memory address later. This is now fixed by ensuring each provider instance gets a UUID and it's used in the cache key. An [issue was opened in aiocache](aio-libs/aiocache#734) regarding this. This issue would likely not have affected any real world use cases. ### Changed - Updated `PyJWT`, `cachetools` and `aiocache`.
- Loading branch information