2017 © Pedro Peláez
 

magento-module magento-turpentine

image

nexcess/magento-turpentine

  • Tuesday, July 31, 2018
  • by miguelbalparda
  • Repository
  • 76 Watchers
  • 502 Stars
  • 418 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 261 Forks
  • 163 Open issues
  • 54 Versions
  • 40 % Grown

The README.md

Nexcess.net Turpentine Extension for Magento

Build Status Scrutinizer, (*1)

Turpentine is a full page cache extension for Magento that works with Varnish, a very fast caching reverse-proxy. By default, Varnish doesn't cache requests with cookies and Magento sends the frontend cookie with every request causing a (near) zero hit-rate for Varnish's cache. Turpentine configures Varnish to work with Magento and modifies Magento's behaviour to significantly improve the cache hit rate., (*2)

Note that while this extension is now considered stable, it is strongly recommended that it be tested on a development/staging site before deploying on a production site due to the potential need to add custom ESI policies for blocks added by other extensions., (*3)

Features

  • Full Page Caching, with hole-punching via Varnish ESI and/or AJAX, even for logged in visitors
  • Configurable via standard Magento methods (Admin system configuration and layout XML), no manual editing of Varnish config required for most cases
  • Able to generate and apply new Varnish VCLs (configurations) on the fly, without restarting/changing Varnish's config files or flushing the cache
  • Blacklist requests from caching by URL or parameters (SID, store, etc)
  • Configure cache TTL by URL and individual block's TTL
  • Supports multiple Varnish instances for clustered usage
  • Automatic cache clearing on actions (clearing product/catalog/cms page after saving)
  • Supports non-root Magento installs (i.e. putting Magento in /store/ instead of /) and multi-store/multi-site setups
  • Support for site-crawlers for cache warming, and includes a (basic) built-in site-crawler
  • SSL support through Pound or Nginx

Requirements

  • Magento Community Edition 1.6+ or Magento Enterprise Edition 1.11+
  • Varnish 2.1+ (including 3.0+)

Installation & Usage

See the Installation and Usage pages., (*4)

Support

If you have an issue, please read the FAQ then if you still need help, open a bug report in GitHub's issue tracker., (*5)

Please do not use Magento Connect's Reviews or (especially) the Q&A for support. There isn't a way for me to reply to reviews and the Q&A moderation is very slow., (*6)

Contributing

If you have a fix or feature for Turpentine, submit a pull request through GitHub to the devel branch. The master branch is only for stable releases. Please make sure the new code follows the same style and conventions as already written code., (*7)

How it works

The extension works in two parts, page caching and block (ESI/AJAX) caching. A simplified look at how they work:, (*8)

For pages, Varnish first checks whether the visitor sent a frontend cookie. If they didn't, then Varnish will generate a new session token for them. The page is then served from cache (or fetched from the backend if it's not already in the cache), with any blocks with ESI polices filled in via ESI. Note that the cookie checking is bypassed for clients identified as crawlers (see the Crawler IP Addresses and Crawler User Agents settings)., (*9)

For blocks, the extension listens for the core_block_abstract_to_html_before event in Magento. When this event is triggered, the extension looks at the block attached to it and if an ESI policy has been defined for the block then the block's template is replaced with a simple ESI (or AJAX) template that tells Varnish to pull the block content from a separate URL. Varnish then does another request to that URL to get the content for that block, which can be cached separately from the page and may differ between different visitors/clients., (*10)

Notes and Caveats

  • Turpentine will not help (directly) with the speed of "actions" like adding things to the cart or checking out. It only caches, so it can only speed up page load speed for site browsing. It will remove a lot of load on the backend though so for heavily loaded sites it can free up enough backend resources to have a noticeable effect on "actions".
  • There are some technical limitations when using Varnish 2.1.x: External ESI requests are not blocked, and per-block TTLs in ESI policies are not honored (all blocks use the default TTL)
  • The core parts of Turpentine (caching and ESI/AJAX injection) work under Magento CE 1.5, but a significant portion of the auxiliary functionality doesn't work due to changes to event names. That said, it would be possible to use Turpentine with Magento CE 1.5 with an understanding that it is not supported and what actions need to be taken manually. Both cache flushing (both automatic an manual) and cache warming (due to missing events that trigger the cache flushing) do not work.
  • Anonymous blocks are not able to be hole-punched. For CMS pages, it is recommended that you include the block in the page's layout updates XML and give it a name, then it can have an ESI policy like normal

Known Issues

  • Logging and statistics will show all requests as coming from the same IP address (usually localhost/127.0.0.1). It should be possible to work around this using Apache's mod_remoteip or mod_rpaf.

Demo

See the Demo Sites wiki page., (*11)

If you use Turpentine (on a production site), feel free to add your site to the list!, (*12)

License

The code is licensed under GPLv2+, much of the ESI-specific code is taken from Hugues Alary's Magento-Varnish extension, which is licensed as GPLv3., (*13)

The Versions

31/07 2018

dev-feature-varnish-future-compat

dev-feature-varnish-future-compat

  Sources   Download

31/07 2018

dev-fix-fpm-headers

dev-fix-fpm-headers

  Sources   Download

31/07 2018

dev-fix-litespeed-esi

dev-fix-litespeed-esi

  Sources   Download

31/07 2018

dev-merge-187

dev-merge-187

  Sources   Download

31/07 2018

dev-patch-kount-compatibility

dev-patch-kount-compatibility

  Sources   Download

06/03 2018

0.1.2

0.1.2.0

  Sources   Download

06/03 2018

0.1.3

0.1.3.0

  Sources   Download

06/03 2018

0.1.0

0.1.0.0

  Sources   Download

06/03 2018

0.1.1

0.1.1.0

  Sources   Download

06/03 2018

0.5.4

0.5.4.0

  Sources   Download

06/03 2018

0.5.5

0.5.5.0

  Sources   Download

06/03 2018

0.0.5

0.0.5.0

  Sources   Download

06/03 2018

0.0.6

0.0.6.0

  Sources   Download

06/03 2018

0.5.1

0.5.1.0

  Sources   Download

06/03 2018

0.5.2

0.5.2.0

  Sources   Download

06/03 2018

0.5.3

0.5.3.0

  Sources   Download

06/03 2018

0.0.2

0.0.2.0

  Sources   Download

06/03 2018

0.0.3

0.0.3.0

  Sources   Download

06/03 2018

0.0.4

0.0.4.0

  Sources   Download

06/03 2018

0.4.0

0.4.0.0

  Sources   Download

06/03 2018

0.5.0

0.5.0.0

  Sources   Download

06/03 2018

0.1.6

0.1.6.0

  Sources   Download

06/03 2018

0.2.0

0.2.0.0

  Sources   Download

06/03 2018

0.2.1

0.2.1.0

  Sources   Download

06/03 2018

0.3.0

0.3.0.0

  Sources   Download

06/03 2018

0.3.1

0.3.1.0

  Sources   Download

06/03 2018

0.3.2

0.3.2.0

  Sources   Download

06/03 2018

0.1.4

0.1.4.0

  Sources   Download

06/03 2018

0.1.5

0.1.5.0

  Sources   Download

26/02 2018

dev-devel

dev-devel http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

08/12 2017

dev-revert-1453-master

dev-revert-1453-master http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

25/07 2017

dev-master

9999999-dev http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

24/07 2017

0.7.3

0.7.3.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

21/02 2017

0.7.2

0.7.2.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

27/12 2016

dev-scrutinizer-patch-3

dev-scrutinizer-patch-3 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

27/12 2016

dev-revert-1132-fix-1129

dev-revert-1132-fix-1129 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

18/11 2016

0.7.1

0.7.1.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

31/05 2016

0.7.0

0.7.0.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

21/04 2016

0.6.9

0.6.9.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

14/01 2016

0.6.8

0.6.8.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

14/01 2016

dev-scrutinizer-patch-2

dev-scrutinizer-patch-2 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

15/10 2015

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

12/10 2015

0.6.7

0.6.7.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

14/09 2015

0.6.6

0.6.6.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

27/08 2015

0.6.5

0.6.5.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

11/08 2015

dev-devel-varnish4

dev-devel-varnish4 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

04/08 2015

0.6.4

0.6.4.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

23/06 2015

dev-Strategery-Inc-damian/cache-management-extended

dev-Strategery-Inc-damian/cache-management-extended http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

23/06 2015

0.6.3

0.6.3.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

10/06 2015

0.6.2

0.6.2.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPL-2.0+

The Requires

 

by Alex Headley

01/10 2014

0.6.1

0.6.1.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPLv2+

The Requires

 

by Alex Headley

03/03 2014

0.6.0

0.6.0.0 http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPLv2+

The Requires

 

by Alex Headley

28/02 2014

dev-feature-better-1.8-compat

dev-feature-better-1.8-compat http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPLv2+

The Requires

 

by Alex Headley

21/02 2014

dev-fix-1.8-compat

dev-fix-1.8-compat http://www.magentocommerce.com/magento-connect/2984.html

A Varnish extension for Magento.

  Sources   Download

GPLv2+

The Requires

 

by Alex Headley