Don't Varnish Over the Cracks

Super-fast Drupal for logged-in users

Presented by David Kitchen / @dwkitchen

Not Going to Look At

  • Stack Options
  • Database Settings Tuning
  • Content Delivery Networks

Caching

Type

  • By Role
  • By User
  • By Page
  • Anything else

Time

  • 1 second
  • 1 minute
  • 1 hour
  • 1 day
  • 1 week

Entities

Entity Cache

Commerce Entity Cache

Render Cache

Views

Time Cache

Panels

Time Cache

Redis/Memcache

Redis

Library

PhpRedis
Redis cache backend using the well performing PhpRedis PHP extension.
Predis
Redis cache backend using the standalone Predis PHP library.

settings.php


$conf['redis_client_interface'] = 'PhpRedis';

$conf['cache_backends'][] = 'sites/all/modules/redis/redis.autoload.inc';
$conf['cache_default_class'] = 'Redis_Cache';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';

$conf['lock_inc'] = 'sites/all/modules/redis/redis.lock.inc';
$conf['path_inc'] = 'sites/all/modules/redis/redis.path.inc';
                        

Authcache

settings.php


$conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.cache.inc';
$conf['cache_backends'][] = 'sites/all/modules/authcache/modules/authcache_builtin/authcache_builtin.cache.inc';

$conf['authcache_builtin_cache_without_database'] = TRUE;
$conf['page_compression'] = 1;
$conf['page_cache_maximum_age'] = 600;
                        

Blocks

Menu

Disabling form-token retrieval

Administration » Configuration » System » Authcache » Form and expand the fieldset Remove form tokens.

search_form
search_block_form
search_api_page_search_form

commerce_cart_add_to_cart_form_*
                        

If you really want to:

Authcache 2 recipe: Upgrade to Varnish and ESI

Other Modules

Advanced CSS/JS Aggregation

Fast 404

Ultimate Cron

Patches

#1905544 Cache mailsystem_get_classes() between requests

Live Demo

What could go wrong?

Network Analysis

Blackfire Analysis

Drupal 8

All of this is built in using

Questions

More Information

Presentation
https://github.com/dwkitchen/dont-varnish
Site Repo
https://bitbucket.org/dwkitchen/dont_varnish
Enterprise for Everyone Distribution
https://www.drupal.org/project/ee