Squidex Client Library - ClientManager

Hi All,
We are evaluating Squidex and so far the entire team has been very impressed with its architecture and ease of use. We are using Squidex.ClientLibrary #6.8.0 and have below questions.

  1. Do the SquidexClientManager cache the required token to call Squidex API and refresh it automatically? Or, should we implement the caching at our end ?
  2. Creating AssetClient and ContentClient costly operation ? Meaning should we try to store an instance of it in memory and re-use it ? Or, it is okay to create them as and when needed ? Which approach do you recommend ?
  3. For a schema with JSON file type, what should be the underlying C# property type ? Can it be string ?


thank you very much for your nice words. About your questions:

  1. SquidexClientManager handles it, but you can override it, by writinga custom Authenticator. This is the default: https://github.com/Squidex/squidex-samples/blob/master/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Configuration/CachingAuthenticator.cs
  2. The creation is not costly, but it creates a HttpClient for each client and then it needs to resolve host names, establish a SSL connection and all this stuff which is very expensive. Reusing the clients in my integration tests improved the performance by factor 3.
  3. It needs to be compatible with JSON.NET. You can write a custom serializer that serializes to string. Otherwise I either recommend JToken or a class structure that represents your json structure.

Thanks for your response Sebastian.

1 Like