Skip to content

14.0.0

Compare
Choose a tag to compare
@petrsvihlik petrsvihlik released this 06 Oct 09:14

New features

  • Support for distributed caching via the IDistributedCache interface - #196
    • there is a new implementation of IDeliveryCacheManager called DistributedCacheManager which implements the IDistributedCache interface using BSON serialization
    • it's possible to register the cache using Kentico.Kontent.Delivery.Caching.Extensions.ServiceCollectionExtensions.AddDeliveryClientCache() by changing DeliveryCacheOptions.CacheType from Memory to Distributed. by default, it registers the MemoryDistributedCache. if you want to use a different implementation (e.g. redis, you need to register its instance before calling AddDeliveryClientCache()
    • Documentation
  • IContentLinkUrlResolver is now async (as well as several other interfaces - see the breaking changes below) - #213
  • DebuggerDisplay attributes for models - #211
  • Enabled low level access to the ApiResponse - #217
  • Faking responses made simpler by only returning interfaces - #216 & #61
  • Added support for new types of filters #229 #232

Bugfixes

  • Automatic formatting of the image transformation API - #224
  • Memory leak when registering named clients - #223
  • Hashcode of a cached type is now part of the cache key - #236

Breaking changes & upgrade advice

  • all models have their interfaces extracted to Kentico.Kontent.Delivery.Abstractions and the SDK returns only the respective interfaces
    • for Asset we have IAsset, for ContentType there is an IContentType, etc.
  • DeliveryCacheManager was renamed to MemoryCacheManager
  • IPropertyValueConverter.GetPropertyValue was made async and strongly-typed. Instead of JToken, you receive ContentElementValue<T> with Name, Codename, Type, and Value properties where Value is of type T and T is the type of your property (DateTime, string, int, Asset....).
  • methods in IContentLinkUrlResolver, IModelProvider, IInlineContentItemsProcessor are now async. their input parameters remain the same but their return type changed to Task<T> instead of the original T and they all have Async suffix
  • some models are now more specific (contain e.g. Guid instead of string where it was appropriate) - apply Guid.Parse() or Guid.ToString() to keep your code compatible or adopt Guids in your code as well
  • places which returned ContentElement now return IContentElement. plus, based on the type of the element, they can return a type castable to IMultipleChoiceElement or ITaxonomyElement to allow strongly typed access to members specific to these types
  • the IDeliveryClient now contains only async methods that operate upon strongly-typed models. all JSON-based methods were removed. if someone wishes to access the raw JSON, all Delivery*Response objects contain an object called ApiResponse of the IApiResponse type. this property contains low-level data like string Content, string RequestUrl, or string ContinuationToken.
    • some overloads were preserved as extension methods but are not required when implementing the IDeliveryClient interface
  • IInlineImage's properties were renamed from AltText and Src to Description and Url respectively
  • All code from the Kentico.Kontent.Delivery.ImageTransformation namespace was extracted to a separate NuGet package Kentico.Kontent.ImageTransformation
  • removed the - AddDeliveryClient(this IServiceCollection services, string name, Func<IDeliveryClientBuilder, IDeliveryClient> buildDeliveryClient) extension method - please use any other overload (they should provide enough flexibility for all scenarios)
  • AngleSharp reference was upgraded to the latest stable version - 0.14.0. If you explicitly reference an older version in your projects, please follow the migration guide and upgrade to 0.14.0 too.

Model generator

Use model generator v6.0.0

NuGets

https://www.nuget.org/packages/Kentico.Kontent.Delivery/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery.Rx/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery.Caching/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.Delivery.Abstractions/14.0.0
https://www.nuget.org/packages/Kentico.Kontent.ImageTransformation/14.0.0