In my project i need ability to improve performance of redirects made by Global redirect.
Most of them take about 300 ms to run full bootstrap.

I think it's great option to cache redirects with default Cache-control headers.
My patch adds option to configuration page and header will be added on any module's redirect.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lahoosascoots’s picture

I'd love to see this get merged. The extra bootstrapping is causing some pain for a site I'm working on, 80% of the traffic is a deslashing 301.

mcdruid’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.76 KB

Tiny tweak to the patch which just changes the wording in the admin form slightly.

Apart from that, tested this and it works great; marked as RTBC.

This could save a lot of sites a lot of bootstraps.

DanielWashbrook’s picture

Just tried this beauty out and it worked nicely! Thanks!

Dave Reid’s picture

Worth mentioning that this can cause horrible infinite redirect loops with the "Case Sensitive URL Checking" feature enabled: https://gist.github.com/davereid/bd3f6b6e45634c88eb6d

Dave Reid’s picture

I would maybe encourage this redirect caching patch in core: #1678348: Add redirects to be cached in drupal_goto()