-
Notifications
You must be signed in to change notification settings - Fork 253
/
turpentine_esi.xml
512 lines (438 loc) · 16.6 KB
/
turpentine_esi.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<?xml version="1.0"?>
<!--
Nexcess.net Turpentine Extension for Magento
Copyright (C) 2012 Nexcess.net L.L.C.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<layout version="0.1.0">
<!--
The `customer_login` and `customer_logout` events are automatically
added to the *flush_events* of all *private* ESI blocks, and should
not be specified in the layout
-->
<default>
<!--
New block used to warn users who choose to navigate without Varnish while it's activated.
-->
<reference name="after_body_start">
<block type="turpentine/notices" template="turpentine/notices.phtml" name="turpentine_notices" />
</reference>
<!--
A default Magento site includes a logged in user's name in the welcome
message and the number of items in the shopping cart so it must be
cached per-client.
-->
<reference name="header">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<wishlist_item_save_after/>
<wishlist_item_delete_after/>
<sales_quote_save_after/>
<controller_action_layout_render_before_catalogsearch_result_index />
<persistent_session_expired/>
</flush_events>
</params>
</action>
</reference>
<!-- This block is inside of the header block on mage EE, so it could
be commented out for EE stores for a small performance increase -->
<reference name="cart_sidebar">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<sales_quote_save_after/>
</flush_events>
</params>
</action>
</reference>
<reference name="catalog.compare.sidebar">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<catalog_product_compare_add_product/>
<catalog_product_compare_remove_product/>
<catalog_product_compare_item_collection_clear/>
</flush_events>
</params>
</action>
</reference>
<reference name="right.reports.product.viewed">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<catalog_controller_product_view/>
</flush_events>
</params>
</action>
</reference>
<reference name="right.reports.product.compared">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<catalog_product_compare_add_product/>
<catalog_product_compare_remove_product/>
<catalog_product_compare_item_collection_clear/>
</flush_events>
</params>
</action>
</reference>
<reference name="right.poll">
<action method="setEsiOptions">
<params>
<access>private</access>
<method>ajax</method>
<flush_events>
<poll_vote_add/>
</flush_events>
</params>
</action>
</reference>
<reference name="global_messages">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<core_session_abstract_add_message/>
</flush_events>
<only_cache_if>no_text</only_cache_if>
</params>
</action>
</reference>
<reference name="messages">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<core_session_abstract_add_message/>
</flush_events>
<only_cache_if>no_text</only_cache_if>
</params>
</action>
</reference>
<reference name="footer">
<action method="setEsiOptions">
<params>
<!-- this is the default but we specifically set it so
it actually gets picked up -->
<access>public</access>
</params>
</action>
</reference>
<reference name="global_cookie_notice">
<action method="setEsiOptions">
<params>
<access>private</access>
<only_cache_if>no_text</only_cache_if>
</params>
</action>
</reference>
</default>
<!-- Blocks only visible when logged in -->
<customer_logged_in>
<reference name="sale.reorder.sidebar">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<sales_quote_save_after/>
<checkout_onepage_controller_success_action/>
</flush_events>
</params>
</action>
</reference>
</customer_logged_in>
<!-- Catalog -->
<catalog_product_compare_index>
<!--
This ESI policy can be used to cache the product comparison popup
but since it's not likely to ever get a cache hit we just don't cache
the popup instead.
-->
<turpentine_cache_flag value="0"/>
<!--
<reference name="catalog.compare.list">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<catalog_product_compare_add_product/>
<catalog_product_compare_remove_product/>
<catalog_product_compare_item_collection_clear/>
</flush_events>
</params>
</action>
</reference>
-->
</catalog_product_compare_index>
<!-- Catalog Search -->
<!--
If the search input box is inside the header, it needs to contain the current search string after searching.
The block below overrules the ESI Options for the header on the search results page.
We change the scope of the header to "page", so the current URL is passed to the ESI request.
We set the TTL to 0, because the same user is probably not going to search for the same string again.
-->
<catalogsearch_result_index>
<reference name="header">
<action method="setEsiOptions">
<params>
<access>private</access>
<scope>page</scope>
<ttl>0</ttl>
</params>
</action>
</reference>
</catalogsearch_result_index>
<!-- fixes issues with 'recently viewed products' in CE 1.9's RWD theme -->
<catalog_category_layered_nochildren>
<reference name="left.reports.product.viewed">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<catalog_controller_product_view/>
</flush_events>
</params>
</action>
</reference>
</catalog_category_layered_nochildren>
<!-- Checkout -->
<!-- We cache the checkout cart page on a per-client basis -->
<checkout_cart_index>
<turpentine_cache_flag value="0"/>
<!--
<reference name="checkout.cart">
<action method="setEsiOptions">
<params>
<access>private</access>
<flush_events>
<sales_quote_save_after/>
</flush_events>
</params>
</action>
</reference>
-->
</checkout_cart_index>
<!-- We never cache anything in the checkout funnel -->
<checkout_onepage_index>
<turpentine_cache_flag value="0"/>
</checkout_onepage_index>
<checkout_onepage_progress>
<turpentine_cache_flag value="0"/>
</checkout_onepage_progress>
<checkout_onepage_progress_billing>
<turpentine_cache_flag value="0"/>
</checkout_onepage_progress_billing>
<checkout_onepage_progress_shipping>
<turpentine_cache_flag value="0"/>
</checkout_onepage_progress_shipping>
<checkout_onepage_progress_shipping_method>
<turpentine_cache_flag value="0"/>
</checkout_onepage_progress_shipping_method>
<checkout_onepage_progress_payment>
<turpentine_cache_flag value="0"/>
</checkout_onepage_progress_payment>
<checkout_onepage_progress_review>
<turpentine_cache_flag value="0"/>
</checkout_onepage_progress_review>
<checkout_onepage_paymentmethod>
<turpentine_cache_flag value="0"/>
</checkout_onepage_paymentmethod>
<checkout_onepage_shippingmethod>
<turpentine_cache_flag value="0"/>
</checkout_onepage_shippingmethod>
<checkout_onepage_additional>
<turpentine_cache_flag value="0"/>
</checkout_onepage_additional>
<checkout_onepage_review>
<turpentine_cache_flag value="0"/>
</checkout_onepage_review>
<checkout_onepage_success>
<turpentine_cache_flag value="0"/>
</checkout_onepage_success>
<checkout_onepage_failure>
<turpentine_cache_flag value="0"/>
</checkout_onepage_failure>
<checkout_prime_debug>
<turpentine_cache_flag value="0"/>
</checkout_prime_debug>
<checkout_prime_index>
<turpentine_cache_flag value="0"/>
</checkout_prime_index>
<checkout_prime_login_step_info>
<turpentine_cache_flag value="0"/>
</checkout_prime_login_step_info>
<checkout_prime_payment_step_info>
<turpentine_cache_flag value="0"/>
</checkout_prime_payment_step_info>
<checkout_prime_progress>
<turpentine_cache_flag value="0"/>
</checkout_prime_progress>
<checkout_prime_review>
<turpentine_cache_flag value="0"/>
</checkout_prime_review>
<checkout_prime_savepayment>
<turpentine_cache_flag value="0"/>
</checkout_prime_savepayment>
<checkout_prime_shipping_step_info>
<turpentine_cache_flag value="0"/>
</checkout_prime_shipping_step_info>
<checkout_prime_getstepinfo>
<turpentine_cache_flag value="0"/>
</checkout_prime_getstepinfo>
<checkout_prime_saveorder>
<turpentine_cache_flag value="0"/>
</checkout_prime_saveorder>
<checkout_prime_getaddress>
<turpentine_cache_flag value="0"/>
</checkout_prime_getaddress>
<checkout_prime_savemethod>
<turpentine_cache_flag value="0"/>
</checkout_prime_savemethod>
<checkout_prime_failure>
<turpentine_cache_flag value="0"/>
</checkout_prime_failure>
<checkout_prime_saveshippingmethod>
<turpentine_cache_flag value="0"/>
</checkout_prime_saveshippingmethod>
<checkout_prime_savecoupon>
<turpentine_cache_flag value="0"/>
</checkout_prime_savecoupon>
<checkout_prime_savebilling>
<turpentine_cache_flag value="0"/>
</checkout_prime_savebilling>
<checkout_prime_success>
<turpentine_cache_flag value="0"/>
</checkout_prime_success>
<checkout_prime_saveshipping>
<turpentine_cache_flag value="0"/>
</checkout_prime_saveshipping>
<checkout_prime_shippingmethod>
<turpentine_cache_flag value="0"/>
</checkout_prime_shippingmethod>
<checkout_prime_getadditional>
<turpentine_cache_flag value="0"/>
</checkout_prime_getadditional>
<gomage_checkout_onepage_index>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_index>
<gomage_checkout_onepage_methods>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_methods>
<gomage_checkout_onepage_paymentmethod>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_paymentmethod>
<gomage_checkout_onepage_centinel>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_centinel>
<gomage_checkout_onepage_review>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_review>
<gomage_checkout_onepage_customerlogin>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_customerlogin>
<gomage_checkout_onepage_review>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_review>
<gomage_checkout_onepage_forgotpassword>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_forgotpassword>
<gomage_checkout_onepage_ajax>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_ajax>
<gomage_checkout_onepage_save>
<turpentine_cache_flag value="0"/>
</gomage_checkout_onepage_save>
<!-- End Checkout -->
<!-- Customer Account -->
<customer_account>
<!--
Disabling caching here disables it for all the customer account sub-
pages, and it doesn't seem to be overridable. We'll do this for now
and add the sub-pages at some later release.
-->
<turpentine_cache_flag value="0"/>
</customer_account>
<customer_account_login>
<turpentine_cache_flag value="0"/>
</customer_account_login>
<customer_account_logoutsuccess>
<turpentine_cache_flag value="0"/>
</customer_account_logoutsuccess>
<customer_account_create>
<turpentine_cache_flag value="0"/>
</customer_account_create>
<customer_account_forgotpassword>
<turpentine_cache_flag value="0"/>
</customer_account_forgotpassword>
<customer_account_resetpassword>
<turpentine_cache_flag value="0"/>
</customer_account_resetpassword>
<customer_account_confirmation>
<turpentine_cache_flag value="0"/>
</customer_account_confirmation>
<contacts_index_index>
<!-- wholepunching the contactForm block is not enough since the form action is wrong in this case -->
<turpentine_cache_flag value="0"/>
</contacts_index_index>
<!--
<customer_account_edit>
<turpentine_cache_flag value="0"/>
</customer_account_edit>
<customer_account_index>
<turpentine_cache_flag value="1"/>
<reference name="customer_account_dashboard">
<action method="setEsiOptions">
<params>
<access>private</access>
<dummy_blocks>
<head/>
</dummy_blocks>
</params>
</action>
</reference>
</customer_account_index>
<customer_address_index>
<turpentine_cache_flag value="0"/>
</customer_address_index>
<customer_address_view>
<turpentine_cache_flag value="0"/>
</customer_address_view>
<customer_address_form>
<turpentine_cache_flag value="0"/>
</customer_address_form>
-->
<!-- End Customer Account -->
<!-- Sales -->
<!--
<sales_order_history>
<turpentine_cache_flag value="1"/>
<reference name="sales.order.history">
<action method="setEsiOptions">
<params>
<access>private</access>
<dummy_blocks>
<root/>
</dummy_blocks>
</params>
</action>
</reference>
</sales_order_history>
-->
<!-- End Sales -->
</layout>