sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.46k stars 430 forks source link

Remove auth caching from chat backend #4076

Closed sweep-nightly[bot] closed 5 months ago

sweep-nightly[bot] commented 5 months ago

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

Suggested changes from Sweep Chat by @kevinlu1248. Continue chatting at http://localhost:3000/c/e2e3b4b9-3ec2-4081-8997-f565a5508064.

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
sweep-chat πŸ”„ Building (Inspect) Visit Preview πŸ’¬ Add feedback Jun 21, 2024 0:53am
sweep-chat-demo βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 21, 2024 0:53am
sweep-docs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 21, 2024 0:53am
sweep-pulley πŸ”„ Building (Inspect) Visit Preview πŸ’¬ Add feedback Jun 21, 2024 0:53am