SenseNet / sn-client-dotnet

A .Net client for sensenet that makes it easy to use the REST API of the Content Repository.
https://www.sensenet.com/
GNU General Public License v2.0
7 stars 16 forks source link

Cached invalid repository connection #108

Open kavics opened 1 year ago

kavics commented 1 year ago

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

tusmester commented 11 months ago

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.