Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove auth caching from chat backend (#4079)
# Purpose This pull request removes the auth caching mechanism from the chat backend to improve consistency and simplify the codebase. # Description The chat backend currently uses auth caching to improve performance. This is implemented using the `diskcache` library with a `Cache` object named `auth_cache`. The caching is applied to two main functions: `get_cached_installation_id` and `get_github_client_from_org`. To remove the auth caching, the following changes have been made: 1. Removed the `auth_cache` object. 2. Removed the `@auth_cache.memoize()` decorators from the relevant functions. 3. Renamed the functions to reflect that they are no longer cached (`get_cached_installation_id` -> `get_installation_id_for_org`, `get_github_client_from_org` -> `get_github_client_from_org`). # Summary - Removed `auth_cache` object - Removed `@auth_cache.memoize()` decorators from `get_cached_installation_id` and `get_github_client_from_org` functions - Renamed `get_cached_installation_id` to `get_installation_id_for_org` and `get_github_client_from_org` to `get_github_client_from_org` Suggested changes from Sweep Chat by @kevinlu1248. Continue chatting at http://localhost:3000/c/e2e3b4b9-3ec2-4081-8997-f565a5508064.
- Loading branch information