Skip to content

CacheDirective enum is missing some directives #2666

@ssokolow

Description

@ssokolow

Expected Behavior

I should be able to use CacheDirective::Immutable for implementing Cache-Control headers for the cache-busting pattern.

Current Behavior

I have to use CacheDirective::Extension("immutable".to_owned(), None)

Possible Solution

Add CacheDirective variants for the following variants listed on MDN but missing from the enum:

  • must-understand
  • immutable
  • stale-while-revalidate
  • stale-if-error

Your Environment

  • Rust Version (I.e, output of rustc -V): rustc 1.59.0 (9d1b2106e 2022-02-23)
  • Actix Web Version: 4.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-webproject: actix-webC-improvementCategory: an improvement to existing functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions