SlideShare a Scribd company logo
1 of 17
Download to read offline
Memcache and Drupal
1. Introduction to caching / memcache
2. Installing memcache on system
3. Integrating memcache in Drupal (Made
quite easy with drupal).
4. Memcache multiple instances
5. Multiple servers for effective performance
in case of high traffic sites.
6. Use of Drupal caching in code to set, get
and purge data as per requirements.
What is Caching
● Wikipedia - “ A web cache is a mechanism
for the temporary storage (caching) of web
documents, such as HTML pages and
images, to reduce bandwidth usage, server
load, and perceived lag “
● Process of storing data for faster access
● Place where this data is stored is referred
to as Cache
Why do we need Caching
● Reduce number of “select” queries to DB
● Reduce number of hits made to 3rd party
services / API’s
● Reduce time where heavy computation is
required.
● Reduce the file system access
Types of caching
● File based caching
● Database based caching (Drupal default)
● Memory based caching (Memcache)
What is Memcache
● Wikipedia- Memcache is a general-purpose
distributed memory caching system.
● It is used to speed up dynamic databasedriven websites by caching data in RAM to
reduce the number of times an external
data source like a database or API is read.
Anatomy and Terminologies
● Stores data in Key Value pair
● Main operations
○ Add data - set
○ Fetch data - get
○ Remove data - delete

● Cold Cache / Warm Cache
● Cache Hit / Cache Miss
Anatomy and Terminologies
● No Persistence data storage
● No Redundancy
● No failover handling
● No authentication required
● A Key cannot store more than 1 MB data
● Key length is limited to 250 characters
A web hit without cache
USER 1

USER 2

USER 3

USER 4

USER 5

INTERNET

APACHE
MYSQL
DB
INDEX.PHP
A web hit with cache
USER 1

USER 2

USER 3

USER 4

USER 5

INTERNET

APACHE
MYSQL
DB
INDEX.PHP

MEMCACHE
Installing Memcache
Simple set of commands
●

Install Memcached on your server
○ apt-get install memcached libmemcached-tools

●

Install memcache PHP extension using PECL
○ apt-get install php-pear
○ pecl install memcache

●

Add memcache.so to php.ini
○ vim /etc/php5/conf.d/memcache.ini
○ extension=memcache.so
Integrating Memcache in Drupal
● Already has module for integrating memcache - https:
//drupal.org/project/memcache
● Simple Integration
○ No adding classes
○ No need to call and use methods
○ No need to take care of bins name, if you are using
multiple
○ Memcache Admin included
○ Test provided to check your memcache setup
○ Works with both, Memcache and Memcached
Integrating Memcache in Drupal
Add below lines to settings.php
1. $conf['cache_backends'][] =
'sites/all/modules/memcache/memcache.inc';
2. $conf['cache_default_class'] = 'MemCacheDrupal';
3. $conf['cache_class_cache_form'] =
'DrupalDatabaseCache'; - Optional
Memcache Multiple Instances

256 MB

64 MB

64 MB

64 MB

64 MB
Memcache Multiple Instances
Command - /usr/bin/memcached -u root -p
11212 -m 64 -d
Memcache Multiple Servers
Cache Examples
cache_set
cache_get
cache_clear_all
Live Example(s)

More Related Content

What's hot

Performance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra KumarPerformance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra KumarSwatantra Kumar
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic siteswpnepal
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high trafficRoshan Bhattarai
 
High Performance Wordpress
High Performance WordpressHigh Performance Wordpress
High Performance WordpressGareth Davies
 
Building Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KLBuilding Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KLGareth Davies
 
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...varien
 
Cache all the things #DCLondon
Cache all the things #DCLondonCache all the things #DCLondon
Cache all the things #DCLondondigital006
 
Hbase Tutorial
Hbase TutorialHbase Tutorial
Hbase TutorialGuru99
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentationArun Janarthanan
 
Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3epee
 
Serve like a boss (part two)
Serve like a boss (part two)Serve like a boss (part two)
Serve like a boss (part two)Hamed Nemati
 
Ireland Moot 2013 Admin Workshop Afternoon Session
Ireland Moot 2013 Admin Workshop Afternoon SessionIreland Moot 2013 Admin Workshop Afternoon Session
Ireland Moot 2013 Admin Workshop Afternoon SessionRemote-Learner UK
 
Speeding up your Drupal site
Speeding up your Drupal siteSpeeding up your Drupal site
Speeding up your Drupal siteRonan Berder
 
Cache all the things - A guide to caching Drupal
Cache all the things - A guide to caching DrupalCache all the things - A guide to caching Drupal
Cache all the things - A guide to caching Drupaldigital006
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress TrivandrumWordPress Trivandrum
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and ScalingGerald Villorente
 

What's hot (19)

Performance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra KumarPerformance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra Kumar
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high traffic
 
High Performance Wordpress
High Performance WordpressHigh Performance Wordpress
High Performance Wordpress
 
Building Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KLBuilding Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KL
 
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
 
Cache all the things #DCLondon
Cache all the things #DCLondonCache all the things #DCLondon
Cache all the things #DCLondon
 
Hbase Tutorial
Hbase TutorialHbase Tutorial
Hbase Tutorial
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
 
Svcc
SvccSvcc
Svcc
 
Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3Mysql 2007 Tech At Digg V3
Mysql 2007 Tech At Digg V3
 
Serve like a boss (part two)
Serve like a boss (part two)Serve like a boss (part two)
Serve like a boss (part two)
 
Ireland Moot 2013 Admin Workshop Afternoon Session
Ireland Moot 2013 Admin Workshop Afternoon SessionIreland Moot 2013 Admin Workshop Afternoon Session
Ireland Moot 2013 Admin Workshop Afternoon Session
 
Drupal
DrupalDrupal
Drupal
 
Speeding up your Drupal site
Speeding up your Drupal siteSpeeding up your Drupal site
Speeding up your Drupal site
 
Cache all the things - A guide to caching Drupal
Cache all the things - A guide to caching DrupalCache all the things - A guide to caching Drupal
Cache all the things - A guide to caching Drupal
 
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and Scaling
 

Viewers also liked

Viewers also liked (8)

Memcache
MemcacheMemcache
Memcache
 
Refreshing mule cache using oracle database change notification
Refreshing mule cache using oracle database change notificationRefreshing mule cache using oracle database change notification
Refreshing mule cache using oracle database change notification
 
Eh cache in Kaunas JUG
Eh cache in Kaunas JUGEh cache in Kaunas JUG
Eh cache in Kaunas JUG
 
Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage Patterns
 
SAP Logistics - CS - Standard Process & Configuration document
SAP Logistics - CS - Standard Process & Configuration documentSAP Logistics - CS - Standard Process & Configuration document
SAP Logistics - CS - Standard Process & Configuration document
 
SAP for Beginners
SAP for BeginnersSAP for Beginners
SAP for Beginners
 
Basics of SAP for noobs (dummies)
Basics of SAP for noobs (dummies)Basics of SAP for noobs (dummies)
Basics of SAP for noobs (dummies)
 
Sap plant maintenance
Sap plant maintenanceSap plant maintenance
Sap plant maintenance
 

Similar to Memcache and Drupal - Vaibhav Jain

Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!WordCamp Cape Town
 
Drupal 7 performance and optimization
Drupal 7 performance and optimizationDrupal 7 performance and optimization
Drupal 7 performance and optimizationShafqat Hussain
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsBrettTasker
 
How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcachevaluebound
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on SteroidsSiteGround.com
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesExove
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best PracticesRatnesh kumar, CSM
 
Drupal 8 and NGINX
Drupal 8 and NGINX Drupal 8 and NGINX
Drupal 8 and NGINX NGINX, Inc.
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedAcquia
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Lonestar php scalingmagento
Lonestar php scalingmagentoLonestar php scalingmagento
Lonestar php scalingmagentoMathew Beane
 
Caching objects-in-memory
Caching objects-in-memoryCaching objects-in-memory
Caching objects-in-memoryMauro Cassani
 
Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i  Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i Zend by Rogue Wave Software
 

Similar to Memcache and Drupal - Vaibhav Jain (20)

Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!
 
Drupal 7 performance and optimization
Drupal 7 performance and optimizationDrupal 7 performance and optimization
Drupal 7 performance and optimization
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applications
 
How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcache
 
Scaling symfony apps
Scaling symfony appsScaling symfony apps
Scaling symfony apps
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Drupal 8 and NGINX
Drupal 8 and NGINX Drupal 8 and NGINX
Drupal 8 and NGINX
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with Memcached
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Lonestar php scalingmagento
Lonestar php scalingmagentoLonestar php scalingmagento
Lonestar php scalingmagento
 
Caching objects-in-memory
Caching objects-in-memoryCaching objects-in-memory
Caching objects-in-memory
 
Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i  Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i
 

More from Drupal Camp Delhi

Campusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj ChourasiaCampusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj ChourasiaDrupal Camp Delhi
 
Generics & Specifics of QA on Web - Sweta Shahi
Generics & Specifics of QA on Web - Sweta ShahiGenerics & Specifics of QA on Web - Sweta Shahi
Generics & Specifics of QA on Web - Sweta ShahiDrupal Camp Delhi
 
How NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai TanayHow NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai TanayDrupal Camp Delhi
 
Amplify user engagement with Game Mechanics - Vidhatanand
Amplify user engagement with Game Mechanics - VidhatanandAmplify user engagement with Game Mechanics - Vidhatanand
Amplify user engagement with Game Mechanics - VidhatanandDrupal Camp Delhi
 
Future proof your drupal skills - Piyuesh Kumar
Future proof your drupal skills - Piyuesh KumarFuture proof your drupal skills - Piyuesh Kumar
Future proof your drupal skills - Piyuesh KumarDrupal Camp Delhi
 
Basic Responsive Theming - Somedutta Ghosh
Basic Responsive Theming - Somedutta GhoshBasic Responsive Theming - Somedutta Ghosh
Basic Responsive Theming - Somedutta GhoshDrupal Camp Delhi
 
What is there in Drupal Community & their do's and don't's - Sivaji
What is there in Drupal Community & their do's and don't's - SivajiWhat is there in Drupal Community & their do's and don't's - Sivaji
What is there in Drupal Community & their do's and don't's - SivajiDrupal Camp Delhi
 
Drush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrupal Camp Delhi
 
Multi lingual implementations – drupal design approaches for different scenar...
Multi lingual implementations – drupal design approaches for different scenar...Multi lingual implementations – drupal design approaches for different scenar...
Multi lingual implementations – drupal design approaches for different scenar...Drupal Camp Delhi
 
Integration of Drupal websites and Android applications - Girish Gupta
Integration of Drupal websites and Android applications - Girish GuptaIntegration of Drupal websites and Android applications - Girish Gupta
Integration of Drupal websites and Android applications - Girish GuptaDrupal Camp Delhi
 
Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...
Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...
Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...Drupal Camp Delhi
 
Drupal Camp Delhi 2013 - Event Brochure
Drupal Camp Delhi 2013 -  Event BrochureDrupal Camp Delhi 2013 -  Event Brochure
Drupal Camp Delhi 2013 - Event BrochureDrupal Camp Delhi
 

More from Drupal Camp Delhi (14)

Content Migration to Drupal 8
Content Migration to Drupal 8Content Migration to Drupal 8
Content Migration to Drupal 8
 
Drupal Camp Delhi 2015
Drupal Camp Delhi 2015Drupal Camp Delhi 2015
Drupal Camp Delhi 2015
 
Campusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj ChourasiaCampusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj Chourasia
 
Generics & Specifics of QA on Web - Sweta Shahi
Generics & Specifics of QA on Web - Sweta ShahiGenerics & Specifics of QA on Web - Sweta Shahi
Generics & Specifics of QA on Web - Sweta Shahi
 
How NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai TanayHow NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai Tanay
 
Amplify user engagement with Game Mechanics - Vidhatanand
Amplify user engagement with Game Mechanics - VidhatanandAmplify user engagement with Game Mechanics - Vidhatanand
Amplify user engagement with Game Mechanics - Vidhatanand
 
Future proof your drupal skills - Piyuesh Kumar
Future proof your drupal skills - Piyuesh KumarFuture proof your drupal skills - Piyuesh Kumar
Future proof your drupal skills - Piyuesh Kumar
 
Basic Responsive Theming - Somedutta Ghosh
Basic Responsive Theming - Somedutta GhoshBasic Responsive Theming - Somedutta Ghosh
Basic Responsive Theming - Somedutta Ghosh
 
What is there in Drupal Community & their do's and don't's - Sivaji
What is there in Drupal Community & their do's and don't's - SivajiWhat is there in Drupal Community & their do's and don't's - Sivaji
What is there in Drupal Community & their do's and don't's - Sivaji
 
Drush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - Sivaji
 
Multi lingual implementations – drupal design approaches for different scenar...
Multi lingual implementations – drupal design approaches for different scenar...Multi lingual implementations – drupal design approaches for different scenar...
Multi lingual implementations – drupal design approaches for different scenar...
 
Integration of Drupal websites and Android applications - Girish Gupta
Integration of Drupal websites and Android applications - Girish GuptaIntegration of Drupal websites and Android applications - Girish Gupta
Integration of Drupal websites and Android applications - Girish Gupta
 
Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...
Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...
Graphics Designing (Character, Posters, Advertisements, Brochure, Interface B...
 
Drupal Camp Delhi 2013 - Event Brochure
Drupal Camp Delhi 2013 -  Event BrochureDrupal Camp Delhi 2013 -  Event Brochure
Drupal Camp Delhi 2013 - Event Brochure
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Memcache and Drupal - Vaibhav Jain

  • 2. 1. Introduction to caching / memcache 2. Installing memcache on system 3. Integrating memcache in Drupal (Made quite easy with drupal). 4. Memcache multiple instances 5. Multiple servers for effective performance in case of high traffic sites. 6. Use of Drupal caching in code to set, get and purge data as per requirements.
  • 3. What is Caching ● Wikipedia - “ A web cache is a mechanism for the temporary storage (caching) of web documents, such as HTML pages and images, to reduce bandwidth usage, server load, and perceived lag “ ● Process of storing data for faster access ● Place where this data is stored is referred to as Cache
  • 4. Why do we need Caching ● Reduce number of “select” queries to DB ● Reduce number of hits made to 3rd party services / API’s ● Reduce time where heavy computation is required. ● Reduce the file system access
  • 5. Types of caching ● File based caching ● Database based caching (Drupal default) ● Memory based caching (Memcache)
  • 6. What is Memcache ● Wikipedia- Memcache is a general-purpose distributed memory caching system. ● It is used to speed up dynamic databasedriven websites by caching data in RAM to reduce the number of times an external data source like a database or API is read.
  • 7. Anatomy and Terminologies ● Stores data in Key Value pair ● Main operations ○ Add data - set ○ Fetch data - get ○ Remove data - delete ● Cold Cache / Warm Cache ● Cache Hit / Cache Miss
  • 8. Anatomy and Terminologies ● No Persistence data storage ● No Redundancy ● No failover handling ● No authentication required ● A Key cannot store more than 1 MB data ● Key length is limited to 250 characters
  • 9. A web hit without cache USER 1 USER 2 USER 3 USER 4 USER 5 INTERNET APACHE MYSQL DB INDEX.PHP
  • 10. A web hit with cache USER 1 USER 2 USER 3 USER 4 USER 5 INTERNET APACHE MYSQL DB INDEX.PHP MEMCACHE
  • 11. Installing Memcache Simple set of commands ● Install Memcached on your server ○ apt-get install memcached libmemcached-tools ● Install memcache PHP extension using PECL ○ apt-get install php-pear ○ pecl install memcache ● Add memcache.so to php.ini ○ vim /etc/php5/conf.d/memcache.ini ○ extension=memcache.so
  • 12. Integrating Memcache in Drupal ● Already has module for integrating memcache - https: //drupal.org/project/memcache ● Simple Integration ○ No adding classes ○ No need to call and use methods ○ No need to take care of bins name, if you are using multiple ○ Memcache Admin included ○ Test provided to check your memcache setup ○ Works with both, Memcache and Memcached
  • 13. Integrating Memcache in Drupal Add below lines to settings.php 1. $conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc'; 2. $conf['cache_default_class'] = 'MemCacheDrupal'; 3. $conf['cache_class_cache_form'] = 'DrupalDatabaseCache'; - Optional
  • 14. Memcache Multiple Instances 256 MB 64 MB 64 MB 64 MB 64 MB
  • 15. Memcache Multiple Instances Command - /usr/bin/memcached -u root -p 11212 -m 64 -d