Skip to content

RPDE feeds do not set Cache-Control headers correctly #137

Closed

Description

@matdavies

Per the recommendations for scaling an RPDE feed, the Cache-Control header for all pages in an RPDE feed should have a value of public, max-age=3600, other than the last page, which should have a value of public, max-age=8

However, the ResponseContent returned from the ResponseContent.RpdeResponse method does not contain any way of indicating whether the page being returned is the last page. It's therefore not possible to vary the cache settings correctly.

Suggest that ResponseContent should have an additional Headers property on it, probably of type Dictionary<string, string> which can then be filled with the correct Cache-Control headers by GetOpenDataRPDEPageForFeed depending on whether this is the last page or not (ie, if the call to RouteOpenDataRPDEPageForFeed returns an empty or non-empty page). The GetContentResult helpers can then add the required headers where necessary.

Activity

  1. added a commit that references this issue on Sep 30, 2021
    8a04210
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions