Description
I'm getting the exception "MessagePack.MessagePackSerializationException" when I call "TrySetAsync" with Disk provider even though I chose to use JSON serializer. When I use InMemory then it doesn't throw any exceptions.
Steps to Reproduce
- Set JSON as my serializer
- Call provider.TrySetAsync
Related code
This my DI
services.AddEasyCaching(option =>
{
option.UseDisk(config =>
{
config.DBConfig = new DiskDbOptions { BasePath = Path.GetTempPath() };
config.SerializerName = "json";
}, "disk").WithJson("json");
});
this is how I call provider.TrySetAsync
await _provider.TrySetAsync(nameof(ListLanguages) + extraKey, response, TimeSpan.FromDays(1));
Expected behavior: [What you expected to happen]
I expected it to save successfully or at least give me another error that is not related to MessagePack because I'm not using it.
Actual behavior: [What actually happened]
I getting an exception that MessagePack serializer failed
Specifications
- Provider : Disk (version 1.6.0)
- Serializer : JSON
- Project: Xamarin Forms
Description
I'm getting the exception "MessagePack.MessagePackSerializationException" when I call "TrySetAsync" with Disk provider even though I chose to use JSON serializer. When I use InMemory then it doesn't throw any exceptions.
Steps to Reproduce
Related code
This my DI
this is how I call provider.TrySetAsync
Expected behavior: [What you expected to happen]
I expected it to save successfully or at least give me another error that is not related to MessagePack because I'm not using it.
Actual behavior: [What actually happened]
I getting an exception that MessagePack serializer failed
Specifications