Skip to content

How to Get/Set A Type Not byte[] #16031

Open
@snowchenlei

Description

Is your feature request related to a problem? Please describe.

I Need Get/Set A Type Not byte[]

Describe the solution you'd like

private readonly IDistributedCache<Person> _genricCache;
private readonly IDistributedCache _cache;
public async Task Test()
{
    Person person = await _genricCache.GetAsync(key);
    //Or
    Person person = await _cache.GetAsync<Person>(key);
}

@Rick-Anderson edit: Integrated issue


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Assignees

No one assigned

    Labels

    Help wantedUp for grabs. We would accept a PR to help resolve this issuecode help wantedSample code help wanted.doc-enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions