-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9819529
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you do this?
I have a situation at a customer where query stings like
?id=5
and?id=64&order=popularity
are added to the ESI URLs by your code.This makes the ESI URLs more unique than needed, which causes blocks that have
<scope>global</scope>
act like they have<scope>page</scope>
, which causes lots of extra ESI requests.I have a better solution for you:
When you need the query parameters from the original URL, you can change the block to
<scope>page</scope>
which will cause the refering URL to encoded in the ESI URL including the query string (params). In this script I show how to decode it. I can't find any helper function in Turpentine to retrieve it more easily.9819529
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miguelbalparda: Would you like a PR to undo this change? I think it is the wrong solution.
I could add a helper function to retrieve the Referer URL in case op
<scope>page</scope>
.BTW: In the Turpentine source code the word
Referer
is spelledReferrer
most of the time.9819529
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree @jeroenvermeulen it's make all esi blocks with scope global doesn't work properly
9819529
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had another big shop where this bug was a huge performance drain.
Fix in #1530
@miguelbalparda Please merge.