Skip to content

Use max-age header to set ttl #3

Description

@eschwartz

It looks like CrispHttpCache is only looking at the the s-maxage header to set TTLs:

main.js:234
if (cacheControlInfo['s-maxage'] && !isPrivate) {
  return callback(null, parseInt(cacheControlInfo['s-maxage']) * 1000);
}

I would think that should be:

const maxAge = cacheControlInfo['s-maxage'] || cacheControlInfo['max-age'];
if (maxAge && !isPrivate) {
  return callback(null, parseInt(cacheControlInfo['s-maxage']) * 1000);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions