DrupalCon Prague 2013

Sitios web de alto rendimiento con Drupal y el módulo Cache Control

Janne Salo  · 


Extracto de la transcripción automática del vídeo realizada por YouTube.

ok hello everyone my name is Janice a lot and i'm a senior developer at x 0 and i'm going to talk to you a bit about the cache control module and how you can use it to help you to build high-performance sites in drupal and how we have used it at x

0 so what I'm going to talk to you first I'm going to spend a couple of moments to talk about who we are as a company and then I'm going to go into some details about the gas control module itself and how it works things like this and well I'm

not going to go into too much details because there are some complexities complexities involved with the module and then I'm going to present you three cases we've used the module in first one is really easy for like perfect use case for the module

is this hockey site called the earthquake oh that's gone then we have a hard case community site for teenage girls the middle fi which has a lot of authenticated users generating a lot of content and it really puts the servers on a strain and then last

last cases is a bit different one in that we didn't have to deal with high loads rather than geographical distribution and after that we'll have some Q&A so few words about EXO we believe in open source which I guess everyone does here and we come

from the Northern Europe headquarter season is in Helsinki and we also have a presence in Estonia and the UK and well we were found that in 2006 and we're about 60 people now more job most of which are developers we don't have that much other staff

and since 2006 were served more than 120 clients and some of you might have met our CEO young a gorilla who is the chair of business and strategy track here at rubicon and this is really all I'm going to say about us for now if you are interested in hearing

more you are welcome to visit at booth booth number 38 so what's cache control and how does it work well on this slide you can see the address to the project page you're welcome to check out the code if you like you'll probably if you're technically

already orientate that you might want to take a look because I'm going to skip some details in this presentation ok so cache control is on concept or conceptual level it's really simple it's it's a module for integrating your site with varnish

or some other external HTTP cache and I'll be mostly talking about war varnish today because it's the one we have most experienced in but we also have some experience with the nginx caching it's pretty much the same except that it doesn't support

perch requests as far as I know and well whenever I say one ish you can replace it with your favorite external HDD be cached if you want and well how it works is it's really just manipulates the cache control headers in the HDD we request that Drupal sends

out and some of you might already have guessed where the modules name comes from and yeah we also have soft support for purging content from the gash and we do automatic purchase when for example nodes update northcote comments things like this and then we

provide a hook system for those who want to upgrade some content on their own but actually I just before just before the launch I went to see the session by the Columbia Law School where they presented their own way of doing cash purging and I kind of like

it so that's cash tagging it it's a way I would like to see cache-control going someday and then gas control comes with an admin UI where you can select which menu move their paths you want to cash and you can also specify different TD else times to

live for different parts view so you can have like content that expires fast and some content that just hangs in there on your perch and so on and we also ship a VCF file for one ish you can use to configure your cash with so how does it work on a very very

high level it goes like this so whenever I request this in coming to the server varnish checks it and see if it can be served from the cache and if it if it can be then 11 is just sent it to the users browser and here's where things get interesting the

varnish also does it for authenticated users and how it can do that is because if the request isn't can't KAG isn't found in the cache varnish of course passes to request a trouble and trouble then starts executing the page load but it does it

as an anonymous user and such generating response that can be cashed by varnish safely there's no personalized data in it and of course we don't do that for all requests in some first of all if the page isn't set cashable then we don't do anything

and then if if the page can't be seen or executed by anonymous user we don't do anything we don't want the cash to fill up with sensitive data ever and and there are also some minor details here some in some cases we might want to bypass the cash

but those are really not worth going into here okay so then the users browser has finally received the response and if if the user happens to be an anonymous one we just showed page to the user and be done with it and if the user happens to be authenticated

we need to generalize personal generate personalized parts of it in a separate HX parent which we call circuit components wagon and then we inject the results on the page and you might wonder what personalized content actually means in this case well first

of all you can you can enable cache-control support for any any block interval meaning that all box you enabled for our tact as personalized and they will be generated for authenticated users in the gate components HX backend and we also provide a an API where

you can tag any any other content then and blocks if you need and for those who are interested we actually in order to be able to generate personalized content in the h HX back end we need to store store the function that's going to be used to generate

[ ... ]

Nota: se han omitido las otras 2.924 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.