Git Product home page Git Product logo

Comments (4)

GaryJones avatar GaryJones commented on July 17, 2024

Should this only be for 301, and not 302?

On my local test system, I'm seeing:

Cache-Control: no-cache, must-revalidate, max-age=0

On a VIP test site, I'm seeing:

cache-control: max-age=300, must-revalidate

from wpcom-legacy-redirector.

GaryJones avatar GaryJones commented on July 17, 2024

Thought - if the redirect has only been added in the last 24 hours, make it max-age=60 or something really small.

If the redirect was added longer ago than 24 hours, make it a max-age={a day}.

These two values would be filterable.

The idea being that someone may add an incorrect redirect, and end up having to wait a day or force clear their cache before being able to confirm it has been fixed.

from wpcom-legacy-redirector.

bdtech avatar bdtech commented on July 17, 2024

You'll also have to be sure to avoid creating additional cache-control: headers as one could be set already.

These redirects also are cached by their max-age, respecting the TTL, upstream via proxies such as Nginx, Varnish, CDN's, etc.

from wpcom-legacy-redirector.

GaryJones avatar GaryJones commented on July 17, 2024

For VIP, the docs say:

Redirects with a 302 HTTP Status are cached for 1 minute, redirects with a 301 HTTP Status are cached for 30 minutes.

from wpcom-legacy-redirector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.