Skip to content

New distributed cache tag helper #160

@sebastienros

Description

@sebastienros

We are adding a new caching tag helper named <distributed-cache>. It differs from the <cache> tag helper by being able to serialize the html fragment in a distributed store like Redis or a database for instance.

For example you can cache the rendering of a View Component like this:

<distributed-cache key="some-key" expires-after="@TimeSpan.FromMinutes(10)">
  @Component.Invoke("Some-Component")
</distributed-cache>

The content will be serialized and stored on a distributed cache storage. The default implementation uses the IDistributedCache service but you can override the behavior by providing custom implementations of IDistributedCacheTagHelperFormatter and IDistributedCacheTagHelperService.

Use aspnet/Mvc#3867 for further discussions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions