Skip to content

Add more functions to HttpCachePolicy #507

@TaoziZ03

Description

@TaoziZ03

Summary

Can I add more functions to HttpCachePolicy?

  1. SetNoStore(): add no-store header
  2. SetETag(string etag): add etag header
  3. UpdateHeaders(): better support no cache scenario, set expires = -1, pragma = no-cache and omit vary.

Motivation and goals

Our legacy code has a custom wrapper of HttCachePolicy and was modfied throughout whole request lifetime. None of attribute and middleware fit in existing design. To skip the design change and migrate to .net core first, I hope to add these functions.

In scope

A list of major scenarios, perhaps in priority order.

Out of scope

Scenarios you explicitly want to exclude.

Risks / unknowns

Please kindly point out other files I should modify.

Examples

Give brief examples of possible developer experiences (e.g., code they would write).

Don't be deeply concerned with how it would be implemented yet. Your examples could even be from other technology stacks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIssues that have a PR open for them.up for grabsWe'd accept a contribution for this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions