Skip to content

MessagePack.MessagePackSerializationException exception #372

@Almis90

Description

@Almis90

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

  1. Set JSON as my serializer
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions