nexcess

Turpentine - Varnish Cache

  • Popularity Score 12192 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.3.2

2013-01-28 16:19:18
  • Version number: 0.3.2
  • Stability: Beta
  • 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.3.2

  • Fixed Turpentine not correctly detecting and disabling ESI/AJAX on requests
    with HTTP Authorization
  • Fixed some requests being passed through Varnish instead of piped resulting
    in incorrect handling of response output
  • Removed cached object TTL extension (added in RELEASE-0.2.0) due to issues
    with cached object contention at high load
  • Improved warm-cache.sh script to handle different platforms better and
    take advantage of multiple processors/cores
  • Added advanced session validation. Varnish will now respect the Magento settings
    for validating the User-Agent, X-Forwarded-For, and Via headers, and the remote
    IP address with respect to sessions (under System > Configuration > General >
    Web > Session Validation Settings).

RELEASE-0.3.1

2013-01-18 21:33:25
  • Version number: 0.3.1
  • Stability: Beta
  • 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.3.1

  • Fixed generated VCL to work with multi-store/multi-site setups with different
    URL paths

RELEASE-0.3.0

2013-01-16 21:38:32
  • Version number: 0.3.0
  • Stability: Beta
  • 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.3.0

The new site crawler functionality in this release adds a new User-Agent to the
default Crawler User Agents setting: "Nexcessnet_Turpentine/."
It is strongly recommended to manually add this new user agent string to the
Crawler User Agents* setting after upgrading as Magento won't automatically
update the config setting with the new default value if the config has been
saved before.
This does not apply to new installs.

  • Added built-in crawler for automatically warming the cache. Also automatically
    warms pages that are flushed on save (product/category/CMS pages)
  • Removed hard-coded "messages" block AJAX options, the ESI/AJAX options for
    the "messages" block can now be configured in the ESI layout file like any
    other block
  • Made ESI client-cache ban (clear) events configurable. See the new "ESI
    Client Cache Purge Events" option
  • Enabling the Normalize User-Agent setting now also differentiates between
    desktop and mobile browsers, for caching different output for desktop and mobile
    browsers
  • Fixed messages block not correctly updating the layout if the layout cache
    was enabled
  • AJAX loaded blocks now (quickly) fade in instead of popping in
  • Enabled continuous-integration builds for PHP 5.2, 5.3, and 5.4 through
    Travis-CI. This is only
    relevant to developers and has no effect on users of the extension

RELEASE-0.2.1

2013-01-07 19:35:14
  • Version number: 0.2.1
  • Stability: Beta
  • 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.2.1


  • Changed the syntax for dummy blocks and registry keys in the setAjaxOptions
    and setEsiOptions layout methods, see the wiki for the new syntax
  • Improved serialization of registry items in ESI/AJAX blocks
  • Fixed AJAX requests always being over HTTPS even if the main page was
    requested over HTTP
  • Changed the dummy URL to "/checkout/cart" instead of "/"
  • Fixed AJAX injection for messages block, which didn't use the standard
    layout method for block definitions. This also includes a new option to
    "Fix Flash Messages" which allows for disabling the new behavior for compatiblity
    with other AJAX extensions
  • Fixed POST request caching, which sometimes caused POST requests to fail the
    first time, and then succeed (bug introduced in RELEASE-0.2.0)
  • Fixed CE 1.6 + EE 1.11 incompatibility introduced in RELEASE-0.2.0

RELEASE-0.2.0

2012-12-12 20:15:42
  • Version number: 0.2.0
  • Stability: Beta
  • 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.2.0


  • Added AJAX injection for very short lived and/or frequently changed blocks
    (like the flash messages). This should resolve the issue with flash messages
    not displaying or displaying sporadically. To enable for other blocks, change
    the setEsiOptions method in the turpentine_esi.xml layout file to
    setAjaxOptions. Note that AJAX injected blocks are not cached at all
  • Added TTL extension for cache hits. Cached object's TTL will be extended by a
    small amount on cache hits to keep frequently used cache objects from expiring
    (unless the cache is flushed), allowing for lower TTL values to keep the cache
    from filling.
  • Prevented ESI injected blocks from being cached via Magento's block html
    caching while still allowing full block output to be cached. This is an
    improvement on the fix in RELEASE-0.1.5 for double ESI-includes
  • Fixed Magento using the ESI getBlock URL as the previously visited URL for
    visitor sessions
  • Fixed ESI injected blocks using the ESI getBlock URL as the current URL
    when rendering
  • Reduced size of generated VCL to reduce chance of hitting CLI buffer limit
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

Turpentine - Varnish Cache is rated 3.3 out of 5 by 26.
Rated 5 out of 5 by from get last version from github Very good extension but to avoid many bugs specially with nginx, get the last version from github from the branch devil
Date published: 2016-10-20
Rated 5 out of 5 by from Probably the best Varnish extension of the market Applied this solution on several applications. While sometimes need adjustments generally works really well.
Date published: 2016-07-28
Rated 1 out of 5 by from i wasted my time realyy i treid everything still not working no steps given for ubuntu with nginx getting Failed to apply the VCL to 127.0.0.1:6082: Varnish data to write over length limit by 1370 characters
Date published: 2015-09-05
Rated 1 out of 5 by from Varnish & Turpentine when you have plenty of spare time After many and many hours decide to remove Varnish and Turpentine. Problems with shopping cart, ajax, geoip etc are not solvable if you aren't a super expert with loads of free and paid time. So leave it for the experts with to much free time. The removal of Varnish is easy, but after remove of turpentine hours and hours wasted time again to get things running again.
Date published: 2015-08-02
Rated 4 out of 5 by from Iphone Theme redering issue on some pages Overall this extension is working excellent.. Their is an issue with multiple theme rendering On my mobile iphone theme its sometime renders desktop theme.i have Normalize User-Agent enabled from admin And i have to keep flushing cache from admin to get mobile theme on particular page.. is there any solution? will really apreciate..!!
Date published: 2015-02-24
Rated 5 out of 5 by from When will this support Magento CE 1.9.. Great extension for Varnish but after testing it only works up to CE 1.7. I realise that magento has some significant changes in the later versions and hence this will not work with it correctly. Do you have any plans to implement support for CE 1.9? or do you have any fix we can apply as I am desperate to get it working! thanks
Date published: 2014-12-20
Rated 4 out of 5 by from It works perfect in 1.7.0.2 (multistore and multidomain) It works perfect in 1.7.0.2 (multistore and multidomain), after modifying the vcl to avoid the mistake of dirty cookie "double cookie frontend" If you solve the problem of double cookie, without needing to have to call our technicians, would be to give it a 5, for now I leave in 4 *
Date published: 2014-01-31
Rated 4 out of 5 by from Huge speed improvement but After finally getting it working, I noticed a massive speed increase on the website. But we are using 1.8.1.0 and found it has a problem with the cart. If you are using 1.8.0 or 1.8.1 don't use this yet until it has been updated. Or customers often wont be able to add items to the cart.
Date published: 2014-01-29
Rated 5 out of 5 by from Great speed improvement I got great speed improvement on my server using Varnish, it was a bit hard to set-up at the beginning but then I made it work. In the configuration backend port needs to be 8080 for Apache and Varnish needs to listen at port 80 in front. This is a sample configuration that works for me. Great piece of software for Magento !
Date published: 2013-10-28
Rated 5 out of 5 by from Superb Varnish can be a real pain, particularly with ecom sites, but with a little nous this module works really really well, and we've seen massive page speed increases - particular on HA multi server environments. That said, if doesn't negate the need for some prior knowledge of varnish and your web server of choice. Big thanks to Nexcess for making it freely available!
Date published: 2013-10-11
  • y_2017, m_2, d_22, h_21
  • bvseo_bulk, prod_bvrr, vn_bulk_0.0
  • cp_1, bvpage1
  • co_hasreviews, tv_0, tr_26
  • loc_en_US, sid_14243, prod, sort_[SortEntry(order=FEATURED, direction=DESCENDING), SortEntry(order=SUBMISSION_TIME, direction=DESCENDING)]
  • clientName_magento

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.