Drupal Caching For Dummies

35

description

Simple Steps to improve the performance of your site, in the increasing order of complexity.

Transcript of Drupal Caching For Dummies

Page 1: Drupal Caching For Dummies
Page 2: Drupal Caching For Dummies
Page 3: Drupal Caching For Dummies

Worked on

while working at Since then I have been working on

at

Gokul N K

Page 4: Drupal Caching For Dummies

Drupal Caching

For DUMMIES

Page 5: Drupal Caching For Dummies

Dwindling Attention Spans

Impatience is a virtue now

Why PERFORMANCE?

Page 6: Drupal Caching For Dummies
Page 7: Drupal Caching For Dummies

A 1 second delay in page response can result in a 7% reduction in

conversions

Source : Akamai.com

Page 8: Drupal Caching For Dummies

In 2010, Google announced that

Website speed would have an impact on search ranking.

Page 9: Drupal Caching For Dummies
Page 10: Drupal Caching For Dummies

Drupal is a database heavy content management system.

Guess how many tables in Drupal7 basic installation

Page 11: Drupal Caching For Dummies

My Blog - 138 Tables

My E-commerce Site

241 Tables

Page 12: Drupal Caching For Dummies

Thumb Rules of Caching

Page 13: Drupal Caching For Dummies

Process Once Use Multiple Times

Page 14: Drupal Caching For Dummies

Live with stale data when possible

Page 15: Drupal Caching For Dummies

Clear Caches infrequently

and keep it very specific

Page 16: Drupal Caching For Dummies

RDBMS is Slow

Key Value database are fast

Page 17: Drupal Caching For Dummies
Page 18: Drupal Caching For Dummies

Page Caching – Performance Page

Block Caching – Block Cache Alter

Aggregate javascript and css files

Disable Un-necessary modules

Cache Views content

Page 19: Drupal Caching For Dummies

Disable DB logging(syslog)

Reduce 404 Errors

Fast 404 Responses

Client Side Validations

Compress Image and lazy loading

Use CSS Sprites

Page 20: Drupal Caching For Dummies

Use Devel Module to watch queries

Rewrite Views Queries/Avoid Views

XHProf

Hhvm, FPM, APC

DB Profiling and Tuning

Page 21: Drupal Caching For Dummies

Use Boost, don't Boot-strap DB

If your cache tables are huge use memcached

Use Reverse Proxy Server

Use heiuristing Cache Clearing

Implement Cache Warming

Page 22: Drupal Caching For Dummies

On Server

Varnish for assets

Compress transfer

Keep Alive

Progressive JPEGS

Etags

Page 23: Drupal Caching For Dummies

Use CDNs

Master Slave DB Config

Database Clusters

Load Balancers

Page 24: Drupal Caching For Dummies

Check out

Jeff Eaton's Blog

CACHING IN CODE

Page 25: Drupal Caching For Dummies
Page 26: Drupal Caching For Dummies
Page 27: Drupal Caching For Dummies
Page 28: Drupal Caching For Dummies
Page 29: Drupal Caching For Dummies

“There are two hard things in computer science:

Cache invalidation, Naming things and

Off-by-one errors.”

Page 30: Drupal Caching For Dummies

More complicated than

you could ever imagine.

CACHE INVALIDATION

Page 31: Drupal Caching For Dummies

l Clear All Caches in performance pagel Admin Menul Flush Page Cachel Expirel Cache Actionsl Purge

Cache Clearing Modules

Page 32: Drupal Caching For Dummies

Clear All Caches

Page 33: Drupal Caching For Dummies

Smartest function in D7?

cache_clear_all();

Page 34: Drupal Caching For Dummies

Important Links

http://bit.ly/drupal-caching

Page 35: Drupal Caching For Dummies

Thank you, Gokul