nexcess

Turpentine - Varnish Cache

  • Popularity Score 12393 Popularity Score

    Popularity ScoreReferrals to Site/Downloads

    0 0 1+ 1+ 250+ 250+ 1000+ 1000+ 10000+ 10000+

  • Select Technology Partner
Simplify Varnish management and deployment with Magento.
Compatible with:
This extension is currently unavailable on Magento Connect. Please contact the developer.

You will be re-directed to the developer's website to complete your purchase.

You must be registered and logged in to get extension key.
In order to get this extension, you must be logged in to the Magento Community. Click here to login or register.

Magento Connect 2.0

Magento Connect 2.0

FREE
Previous Next
Overview

Turpentine - Varnish Cache

Nexcess.net Turpentine Extension for Magento

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.

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.

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 4.0)

Installation & Usage

See the Installation and Usage pages.

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.

Please do not use Magento Connect's Reviews or (especially) the Q&A for support, as it is not monitored as closely as github.

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.

How it works

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

For pages, Varnish first checks whether the visitor sent a frontend cookie. If they didn't, then the request will be passed through to Magento in order generate a valid session. Note that the cookie checking is bypassed for clients identified as crawlers (see the Crawler IP Addresses and Crawler User Agents settings).

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.

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 auxillary 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.

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

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.

M1 Extension Versions

RELEASE-0.6.3

2015-07-28 15:03:28
  • Version number: 0.6.3
  • Stability: Stable
  • Compatibility: 1.7, 1.8, 1.8.1, 1.9
You must be registered and logged in to get extension key.

Magento Connect 2.0

Magento Connect 2.0

Nexcess.net Turpentine Extension for Magento

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.

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.

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.

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.

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.

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.

How it works

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

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).

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.

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.

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

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.

RELEASE-0.6.1

2014-10-01 17:36:40
  • Version number: 0.6.1
  • Stability: Stable
  • Compatibility: 1.6, 1.6.1, 1.6.2.0, 1.7, 1.8, 1.8.1, 1.9, 1.11, 1.11.1, 1.12, 1.13, 1.13.1, 1.14
You must be registered and logged in to get extension key.

Magento Connect 2.0

Magento Connect 2.0

RELEASE-0.6.1

  • [#471] Fixed addMessage() in messages block (@arosenhagen)
  • [#445] Update Cron.php for compatibility with MageWorx_XSitemap (@evensisftw)
  • [#474] Add ESI decoder utility (@jeroenvermeulen)
  • [#485] Trigger layout events when rendering ESI blocks (@eth8505)
  • [#490] Fix missing ESI blocks when they are defined in a reference instead
    of a block (@paales)
  • [#472] Added <only_cache_if> ESI parameter for caching flash message
    blocks (@jeroenvermeulen)
  • [#494] Added option to control the stripping of whitespace from generated
    VCLs (@eth8505)
  • [#549] Enabling the fix_product_toolbar option now clears previously set
    view preferences (@jeroenvermeulen)
  • [#529] Added decoding of the referrer to the ESI decoder
    utility (@jeroenvermeulen)
  • [#536] Allow // (double slash) comments in VCL files and strip them when
    trimming whitespace (@eth8505)

RELEASE-0.6.0

2014-03-03 22:45:25
  • Version number: 0.6.0
  • Stability: Stable
  • Compatibility: 1.6, 1.6.1, 1.6.2.0, 1.7, 1.8, 1.8.1, 1.11, 1.11.1, 1.12, 1.13, 1.13.1
You must be registered and logged in to get extension key.

Magento Connect 2.0

Magento Connect 2.0

RELEASE-0.6.0

This release requires a small addition to Varnish's configuration when used with
Magento CE 1.8+ or EE 1.13+, see these instructions

  • [#362] Fixed ESI detection for message block (thanks @eth8505)
  • [#380] Fixed ESI cache flushes not firing in some cases (thanks @gabrielsomoza)
  • [#391] Added Magento Composer Installer support (thanks @ajardin)
  • [#405] Fixed disabling Varnish bypass (thanks @ajardin)
  • [#438] Implemented ban lurker-friendly bans (thanks @jeroenvermeulen)
  • [#443] Fixed caching of static assets when the Add Store Code to Urls option
    is enabled (thanks @jeroenvermeulen)
  • [#345] Fixed compatibility with Magento CE 1.8 and EE 1.13

RELEASE-0.5.5

2013-11-20 19:04:48
  • Version number: 0.5.5
  • Stability: Stable
  • Compatibility: 1.6, 1.6.1, 1.6.2.0, 1.7, 1.11, 1.11.1, 1.12
You must be registered and logged in to get extension key.

Magento Connect 2.0

Magento Connect 2.0

RELEASE-0.5.5

  • Made VCL templates slightly shorter to help with running into the inline
    VCL character limit
  • The warm-cache.sh script now respects the PROC environment variable for
    the number of processes to use while warming the cache
  • [#253] Fixed VCL to correctly identify Chrome on OS X
  • [#281] Fixed unintentional flushing of full cache in some cases (thanks
    @jeroenvermeulen)
  • [#301] Fixed IE caching AJAX ESI includes (thanks @nickbock)
  • [#320] AJAX ESI should be compatible with themes that use jQuery instead of
    Prototype (thanks @steverice)
  • [#334] Bad URIs that cause the dummy request creation to throw an exception
    will now log the bad URI and hide the exception when debugging is disabled
    (thanks @ajardin)
  • [#337] Improve layout handle searching for ESI blocks in some cases (thanks
    @sanbornm)
  • [#356] Fix ESI blocks not rendering child blocks (thanks @magedev)
  • Changed Varnish-generated session ID format for compatibility with the
    SFC_Kount extension
  • Failures during advanced registry loading in ESI requests should be handled
    more gracefully

RELEASE-0.5.4

2013-06-12 22:04:50
  • Version number: 0.5.4
  • Stability: Stable
  • Compatibility: 1.6, 1.6.1, 1.6.2.0, 1.7, 1.11, 1.11.1, 1.12
You must be registered and logged in to get extension key.

Magento Connect 2.0

Magento Connect 2.0

RELEASE-0.5.4

  • Fixed the Varnish-generated frontend cookie occasionally being set with
    the wrong path when Magento was located in a subdirectory instead of the
    root of the site
  • The built-in crawler should no longer try to crawl products that are not
    visible in the frontend
  • Missing blocks caused by layout changes between different handles should be
    handled more gracefully by Turpentine now
  • Parent products will also be banned when a child product goes out of stock
    or is saved
  • Fixed CMS URL generation for the built-in crawler
  • Fixed product stock change check to actually work
  • Improved the dummy request mock up. It should have all expected fields
    populated now and changes to it will not affect the global state or original
    request
  • Added a Magento shell script (util/varnishadm.php) that can be used like
    the real varnishadm command for users who aren't able to use real
    varnishadm command
  • Fixed duplicate flash messages experienced in some cases (thanks to
    @craigcarnell)
  • Made the custom_include.vcl file's location configurable, see the new
    Custom VCL File Location option
  • Added template parsing to the custom include VCL file, {{variable}}
    replacement will now also work in this file
  • Added a toggle-able Varnish Bypass to Cache Management page for bypassing
    the cache (including ESI) for a single admin session (thanks to @alexandre-jardin)
  • Varnish will now strip the Google-related parameters from the request to
    increase cache hit-rate
Q&A
Get Help

Support for This Extension

The best place to start if you need help with a specific extension is to contact the developer. All Magento developers have both a contact email and a support email listed.

Magento Platform Support

If you need support for a Magento platform, there are different options for support depending on which Magento platform you are using. Below are links for specific platforms.

Reviews

About the Developer

This extension was developed by and is supported by nexcess

In order to upload extension, you must be logged in to the Magento Community. Click here to login or register.

Close

Register

* Required Fields

Close window

Forgot Your Password?

Please enter your email below and we'll send you a new password.

* Required Fields

Close window

Login

To upload extension you must be logged in.

* Required Fields

Close window

You are using an outdated browser

We built Magento Connect using the latest techniques and technologies.
This makes Magento Connect faster and easier to use.
Unfortunately, your browser doesn't support those technologies.
Use the links below to download a new browser or upgrade your existing browser.