Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cached invalid repository connection #108

Open
kavics opened this issue May 1, 2023 · 1 comment
Open

Cached invalid repository connection #108

kavics opened this issue May 1, 2023 · 1 comment

Comments

@kavics
Copy link
Contributor

kavics commented May 1, 2023

There are two scenarios.

The good case: The client starts and gets a repository that works correctly. After any network error, the reconnection can be successful and the work can continue.

The worst case: The client starts and gets a repository that does not work correctly because of any reason. Work is impossible, even after a successful connection. There is only one option: the client must be restarted.

The reason: The IRepositoryCollection instance (from the services) caches repositories on first access. An unavailable repository has an empty access token forever, so the only accessible user for it can be the Visitor.

Possible solutions

  • If the client can recognize this problem, it could solve it by invalidating the server cache (e.g. repositories. Reset();) and restart is not necessary.
  • caching repositories for only a limited time in a real memory cache instead of a dictionary
  • cache reset should target a single repository or maybe a server instance, not all of them
@tusmester tusmester changed the title Unable to connect to the repository. Cached invalid repository connection May 2, 2023
@tusmester
Copy link
Member

tusmester commented Sep 1, 2023

We solved the shorter cache time in #119. We still need to add the Reset functionality because we do not want to wait for the cache to expire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants