nexcess_net

Turpentine - Varnish Cache

  • Popularity Score 4610 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.1.4

2012-12-03 23:25:10
  • Version number: 0.1.4
  • 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.1.4

  • Added ESI block flushing on customer login/logout
  • Fixed syntax error under PHP 5.2 in release 0.1.3
  • Added syntax check to build script
  • Made "footer" block global ESI cached by default
  • Removed "Varnish Management" admin page
  • VCL is now saved and applied on Varnish Options and Caching Options config saving
  • Cache clearing is now integrated into Cache Management page like other Magento cache types
  • Cache clearing by URL and content type have been removed since they were not very useful in light of automatic cache clearing

RELEASE-0.1.2

2012-11-28 19:47:46
  • Version number: 0.1.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.1.2

  • Disable ESI injection if request does not come through Varnish to prevent broken output for SSL-enabled sites

RELEASE-0.1.1

2012-11-27 17:13:47
  • Version number: 0.1.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.1.1

  • Fixed EE ESI template and layout install location
  • Fix missing files in previous release

RELEASE-0.1.0

2012-11-26 23:07:01
  • Version number: 0.1.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.1.0

Note that this release has significant changes from the previous releases, please read the full release notes before upgrading.
  • Hole-punching/ESI support
  • Crawler support for cache warming
  • Most issues with Varnish communication will display flash errors instead of throwing exceptions now

Many/most configuration options were changed/renamed in this release, you should verify your configuration settings after upgrading.

RELEASE-0.0.6

2012-11-12 17:35:15
  • Version number: 0.0.6
  • 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.0.6

  • Make backend timeouts and grace period configurable
  • Initial Enterprise Edition release
  • Improve cache hit rate in some cases
Reviews

About the Developer

This extension was developed by and is supported by nexcess_net

Turpentine - Varnish Cache 4.6 5 20 20
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 * January 31, 2014
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. January 29, 2014
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 ! October 28, 2013
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! October 11, 2013
Turpentine - Varnish Cache - mature product. Today this is the only cache you can use to lower your server load to 0%. Easy install, easy to configure and maintain. No errors whatsoever. You need some magento layout knowledge to configure it with highly customized theme, but it works in 95% out of the box. August 12, 2013
Works great but... I'm not seeing any headers in the pages - does the extension remove them. Also the cart in the header is not updated when something is added - how do I fix this? August 7, 2013
why it happens? when i install it through magento connect manager, it returns: Checking dependencies of packages CONNECT ERROR: Unsupported resource type July 4, 2013
Super!!!! Hats off for the people who made this extension possible.... June 12, 2013
Loading Time I don't know why the loading time need around 5 seconds then can be opening the webpage. May I to know how to fix this problem, Thank you :) June 5, 2013
Holy cow zoom. zoom. zoom. amazing. we've been using the phoenix varnish extension for ages. this blows it away. April 13, 2013
2 next>>
Q&A
(7 Questions : 4 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
-
7 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_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
-
2 months ago
+1point
1out of 1found this answer helpful.
Was this helpful?Yes1No0

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
-
2 months, 4 weeks 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, 4 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, 4 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 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
-
6 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
-
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_27401563
Customer avatar
How do you integrate turpentine vcl with Unixy?
by
jasonnovember
-
6 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
-
4 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
-
3 months, 2 weeks ago
0points
0out of 0found this question helpful.
Was this helpful?Yes0No0
1 of 1
1 of 1
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.