nexcess_net

Turpentine - Varnish Cache

  • Popularity Score 5703 Popularity Score

    Popularity ScoreReferrals to Site/Downloads

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

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.
In order to get this extension, you must have active Magento Go Store. Click here to create Go store.

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

Release Notes

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

RELEASE-0.5.3

2013-04-03 21:59:47
  • Version number: 0.5.3
  • 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.3

  • Added runtime model/helper/block rewriting. This negates the need to comment
    out the core/messages block rewrite to really disable the flash messages
    fix when using Turpentine in combination with certain other extensions
  • Add run-time detection of Varnish cli_buffer param to allow for longer VCLs
    after increasing the limit at Varnish start up
  • Added the new Fix Product List Toolbar option (under Varnish Options >
    General) to prevent caching of the products-per-page and product sorting options
    in the product list toolbar. Note that this option defaults to Disabled
  • Added the store and currency cookies to the request hash. This allows
    Varnish to differentiate between multiple stores with the same base URL and
    fixes currency handling.
  • Added a new option to disable the automatic application of the new VCL when
    making changes to the Varnish Options or Caching Options config sections
  • The Flush Catalog Images Cache and Flush JavaScript/CSS Cache no longer
    also flush the corresponding URLs in Varnish. This helps prevent broken images
    and script links after using those buttons.
  • Fixed Varnish ESI parsing failures that some users were experienced. This
    should prevent the "ESI processing not enabled" seen on some blocks
  • Removed the default ESI policy on the checkout.cart block as it was
    causing the shipping and tax quoting to not update correctly. It will be
    re-added in a future release once the quote issue is resolved
  • Added a X-Turpentine-Block header to ESI/AJAX responses containing the
    name of the block rendered
  • Disabled caching of the product comparison popup in the default ESI policy.
    This does not affect the product comparison block, only the popup window
    showing the actual comparison
1 2 3 4 5
Reviews

About the Developer

This extension was developed by and is supported by nexcess_net

Turpentine - Varnish Cache 4.6 5 21 21
Holy cow zoom. zoom. zoom. amazing. we've been using the phoenix varnish extension for ages. this blows it away. April 13, 2013
Prime Cache Crashes Server Whenever I turn on / off prime crash it completely brings the server down and I have to disable, enable and then restart varnish. April 11, 2013
Store view vise customization I am using multiple store with multiserver configuration in my website(Admin on dedicated box). I want to configure this extension for frontend servers,but on admin side if i select store view extension option are not visible on the store view section, March 15, 2013
It simple and work super fast This is the best module for varnish cache, i have tried all the other possibilities out there and this worked instantly. Thanks to the developer. Best regards, and keep up the good work. March 8, 2013
Gives Magento a jetpack This is just the best fricken extension to accompany Varnish out there. There is no performance tweak that comes close to what Turpentine+Varnish can do for Magento. I feel like my site, running on a cheap VPS, can compete with the likes of those on dedicated hosts. March 3, 2013
I have noticed a small...well, maybe not so small issue. For every online client instance, magento logs 4 cache instances, like this: http://domain.com/turpentine/esi/getBlock/cacheType/per-client/ttl/300/esiData/M3I3TkZBWVNLYXlGQ0tRU2swbDhQWmdySmRvSjFpTUkwdlNhVDRlLzN2bzlPYms5Z0llbUpvOXpLcERRNkJZL2xPYUE3TGFpa2dERzRGUkRuaFNUb0EzKzA4R2JNZ2ZGU3UyVVVwbVRRNTZjOW10dUcxR2RPcDFuZG95TG05U This means 1000 visitors become 5000. January 16, 2013
Hi, I upgraded just some hours ago and it looks cool for me (page load at 60-100ms), only with Varnish I as at about 1-2 seconds and only Apache I was at 5-10 seconds. I do not like one small part in the Varnish config create from your extension: removal of the cache headers. So I just comment out the two lines created by your extension in default.vcl. ... #call remove_cache_headers; #set beresp.ttl = 28800s; ... Thanks and congratulation BR Markus January 14, 2013
I tries this out on a demo system, varnish running with 250MB memory backed storage... pretty standard setup I expect - just moved the backend to 127.0.0.1 and put this in front. ttfb ( this is a demo shop install ) went *UP* from 350ms to 1250! Any ideas where to start looking? This is a nginx /php-fpm config. January 2, 2013
Hi there, Im having some issues with Varnish. Everything is caching as expected. However some onsite JS (Ajax add to cart) returns Error on first load but okay on 2nd load. Any help would be appreciated! December 27, 2012
Just installed varnish and turpentine, everything is working as expected. However, how do I know if Varnish is caching? December 26, 2012
<<prev2 3 next>>
Q&A
(13 Questions : 6 Answers)

Product Q&A

Ask your questions. Share your answers.

 
 
« Back
 
 
Sort by
 
2 answers

1.8.1.0 Compatibility

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_27347772
Customer avatar
Does this work with CE 1.8.1.0?
by
sml12
-
1 year ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0

Answers

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_404763
Customer avatar
Answer: 
From what I've gathered in my test environment, it is not. Looks like Varnish itself has some compatibility issues with 1.8.X and Turpentine goes right along with it. I can't get this working at all since the upgrade.
by
barproducts
-
8 months ago
+1point
1out of 1found this answer helpful.
Was this helpful?Yes1No0

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_27454397
Customer avatar
Answer: 
Version 0.6.0 upwards works with 1.8+. This version fixes an incompatibility with the form_key CSRF protection. You'll need to add -p esi_syntax=0x2 to your Varnish startup options.
by
multicoptersltd
-
7 months ago
+1point
1out of 1found this answer helpful.
Was this helpful?Yes1No0
Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_105580
Customer avatar
Does this extension work with Magento 1.9.0.1?
by
Kunzi
-
3 months, 2 weeks ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0

Answers

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_4899
Customer avatar
Answer: 
CE 1.9 is supported as of version 0.6.1
by
nexcess_net
-
2 months, 3 weeks ago
0points
0out of 0found this answer helpful.
Was this helpful?Yes0No0

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_26873850
Customer avatar
Answer: 
BUMP! - Has this developer Varnished? lol.

When is an update available for 1.9.1 ?????
by
scribblevision
-
3 months, 1 week ago
0points
0out of 0found this answer helpful.
Was this helpful?Yes0No0
Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_26234457
Customer avatar
After I enable Varnish and complete the install I am no longer able to view GET timthumb.php images for my homepage. Timthumb.php brings in several images for my slideshow and product slider. Anyone have any experience with getting timthumb.php images to work after enabling varnish on port 80 and setting up the turpentine plugin?

Cody
by
Betsworth22
-
1 year, 9 months ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0

Answers

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_26268542
Customer avatar
Answer: 
Hi, im no expert but we managed to also install varnish and turpentine, the way i understand how it works is that varnish server is serving cached content. If timthumb.php serves dynamic images then varnish will show only the cached version. You have to create an xml block for that file. Then edit the turpentine_esi.xml and add that block with an esi parameter to tell varnish not to cache that block. When a the page is called, varnish will pull the block from the webserver and combine it with the cached version to serve the complete page. Hope this helps.
by
jpadua
-
1 year, 9 months ago
0points
0out of 0found this answer helpful.
Was this helpful?Yes0No0
Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_371050
Customer avatar
Hi, I don't know where and how to configure Varnish.
by
jaautomacao
-
1 year, 5 months ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0

Answers

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_27405268
Customer avatar
Answer: 
Hi,

After installation go to your Configuration panel.
( System > Configuration ).

In left panel there has to be a "Turpentine" option list. And in that list you can see Varnish and Caching options pages
by
semihmasat
-
11 months ago
+1point
1out of 1found this answer helpful.
Was this helpful?Yes1No0
 
0 answers

Tracking

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_25884151
Customer avatar
Since we installed Turpentine Varnish our E-Commerce Tracking does not work anymore.

Is this a known problem?

Thank you for the great work!

Best regards
Daniel Meyer
by
visuwerkdm
-
1 year, 2 months ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0
Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_27401563
Customer avatar
How do you integrate turpentine vcl with Unixy?
by
jasonnovember
-
11 months ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0
 
0 answers

Success on ajax call

Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_392532
Customer avatar
Hey! Great extension! Thank you!
Is there a way to call a jquery function on an object loaded with turpentine through ajax after it finished loading? ( similar to "success" from jquery ajax)
by
ddevil
-
9 months ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0
Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_26155438
Customer avatar
by
separaatcom
-
8 months ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0
Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_25933365
Customer avatar
HI,

How to solve this problem? On product click

ESI processing not enabled

Varnish 3
Magento 1.7.0.2
by
brunomenol
-
4 months, 2 weeks ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0
Avatar Image Url:: http://www.magentocommerce.com/images/avatars/uploads/avatar_25987036
Customer avatar
Hi, How can I configure Varnish to see my site from corporates networks (no direct internet connection)?
Caching behavior is not good, no privacy between sessions.
by
PabloCalvo
-
3 months, 3 weeks ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0
2 next>>
2 next>>
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.

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.