SlideShare a Scribd company logo
1 of 15
Web Cache
What is Cache?
Cache is the storing of data temporarily to improve
performance. Cache exist in a variety of areas such as
your CPU, Hard Disk and DNS.



CPU Cache           Hard Disk Cache             DNS Cache




                     www.prodigyview.com
Our Focus
Our focus on this tutorial will be web cache. Web cache is
temporary storing of data that is used with delivering a
webpage (html, php, javascript, etc).
Why and How
Many sites today are dynamic websites that

1. Use a database connection
2. Written with a scripting language
3. Have changing content
With the amount of technology behind making these sites
work combined with larges volumes of traffic going to these
sites, cache is very important to improve the user
experience and lowering cost of your hardware.


                       www.prodigyview.com
Basic Flow Without Cache
           Server




User                  Database
This Is Ok If…..

1. Not a lot of content
2. Small amount of users/pageviews

         This Is Bad If…..

1. Lots of contents
2. Lots of users/pageviews
                 www.prodigyview.com
Flow With Cache
            Server




                                 2. Server gets content that
                                 is cached




                 Database only needed to be called for
                 new content




User                                      Database
Cache Benefits
 CPU Cycle Billing: If you are billed by the CPU Cycle,
  cache can save you money because less of the cpu is
  used when reading a file rather than a complex database
  query.

 Bottleneck: If there is a bottleneck on your web service
  such as with your database, not calling the database as
  often and using cached database queries could help with
  that bottleneck

 Faster UI: Storing cached files, whether in a file in the
  browser or a location on the server, can lower the amount
  of time need to load a page. This can make a faster user
  experience.
                        www.prodigyview.com
Basic Caching Methods
 Headers: PHP has a cache option set in the headers. This
  can be useful for caching external files such as JavaScript
  and CSS files.
 Basic File Cache: Basic file cache is an easy to implement
  solution for writing and reading cache on a server.
 Memcache: A PHP extension for caching files on multiple
  servers.
 Cache Lite: A PHP extension installed through PEAR that
  caches whole pages or sections of pages.
 APC : APC, short for Alternative PHP Cache, is another php
  extension that cache’s PHP code. It is installed through
  PECL.


                       www.prodigyview.com
Higher Level Caching
 Varnish: A HTTP accelerator(reverse proxy) that
  caches data in virtual memory.
 Squid: A caching server that can cache DNS, FTP,
  HTTPS, HTTP, TSL, and SSL protocols.
 Apache Traffic Server: A reverse proxy and forward
  proxy caching server that despite its name, works with
  Nginx.
 XtraDB: If you are using a Mysql database, this
  caching solution can help optimize performance of your
  database better than the standard InnoDB.


                     www.prodigyview.com
Server Cache(Squid or Varnish)
                              Server




                                                 The actual server and the
                                                 database server are not
                                                 called unless new content
   1. User request goes to server                is needed

                             Cache Server




          2. Cache servers returns cached data
 User                                                      Database
Database Cache
            Server




User                 3. Use cached query Database
Review
As you can see, caching can occur at many levels.

 Database (ex: XtraDB)
 Server ( ex: Memcache)
 DNS/Networks ( ex: Squid)
 Client’s Browser (ex: Headers)
Take the time to research these solutions further to see
how can they improve your site’s performance.



                     www.prodigyview.com
ProdigyView and Caching
 Natively, ProdigyView offers two type of caching: file
  cache and memcache. Bot are easy to setup and use.

 Caching solutions can be extended by using a third
  party caching solution or writing an adapter that will
  change how the cache works.




                      www.prodigyview.com
API Reference
For a better understanding of cache in ProdigyView, visit
the api by clicking on the link below.

PVCache




                 More Tutorials
For more tutorials, please visit:

http://www.prodigyview.com/tutorials


                       www.prodigyview.com

More Related Content

What's hot

What's hot (20)

Apache web service
Apache web serviceApache web service
Apache web service
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Files
FilesFiles
Files
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
Xml
XmlXml
Xml
 
Data warehouse
Data warehouse Data warehouse
Data warehouse
 
CSS
CSSCSS
CSS
 
Web controls
Web controlsWeb controls
Web controls
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-Developers
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Web server
Web serverWeb server
Web server
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
 
Basics of the Web Platform
Basics of the Web PlatformBasics of the Web Platform
Basics of the Web Platform
 
Memory virtualization
Memory virtualizationMemory virtualization
Memory virtualization
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
css.ppt
css.pptcss.ppt
css.ppt
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 

Similar to Understanding Web Cache

Caching and Its Main Types
Caching and Its Main TypesCaching and Its Main Types
Caching and Its Main TypesHTS Hosting
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonChris Olbekson
 
Caching objects-in-memory
Caching objects-in-memoryCaching objects-in-memory
Caching objects-in-memoryMauro Cassani
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimizationAlmog Baku
 
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)jaredwsmith
 
Simple server side cache for Express.js with Node.js
Simple server side cache for Express.js with Node.jsSimple server side cache for Express.js with Node.js
Simple server side cache for Express.js with Node.jsGokusen Newz
 
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
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesExove
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sitesdrupalcampest
 
Analysis of Google Page Speed Insight
Analysis of Google Page Speed InsightAnalysis of Google Page Speed Insight
Analysis of Google Page Speed InsightSarvesh Sonawane
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentationArun Janarthanan
 
Caching in Drupal 8
Caching in Drupal 8Caching in Drupal 8
Caching in Drupal 8valuebound
 
Starting with varnish cache
Starting with varnish cacheStarting with varnish cache
Starting with varnish cacheRobert Richelieu
 

Similar to Understanding Web Cache (20)

23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Caching and Its Main Types
Caching and Its Main TypesCaching and Its Main Types
Caching and Its Main Types
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
 
Caching objects-in-memory
Caching objects-in-memoryCaching objects-in-memory
Caching objects-in-memory
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimization
 
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)
 
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
 
Caching
CachingCaching
Caching
 
Simple server side cache for Express.js with Node.js
Simple server side cache for Express.js with Node.jsSimple server side cache for Express.js with Node.js
Simple server side cache for Express.js with Node.js
 
HTTP Caching.pptx
HTTP Caching.pptxHTTP Caching.pptx
HTTP Caching.pptx
 
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
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Computer Network.pptx
Computer Network.pptxComputer Network.pptx
Computer Network.pptx
 
Branch office access with branch cache
Branch office access with branch cacheBranch office access with branch cache
Branch office access with branch cache
 
Analysis of Google Page Speed Insight
Analysis of Google Page Speed InsightAnalysis of Google Page Speed Insight
Analysis of Google Page Speed Insight
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
 
Caching in Drupal 8
Caching in Drupal 8Caching in Drupal 8
Caching in Drupal 8
 
Starting with varnish cache
Starting with varnish cacheStarting with varnish cache
Starting with varnish cache
 

More from ProdigyView

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-insProdigyView
 
Building An Application
Building An ApplicationBuilding An Application
Building An ApplicationProdigyView
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing ApplicationsProdigyView
 
Video Content Management
Video Content ManagementVideo Content Management
Video Content ManagementProdigyView
 
Audio Content Management
Audio Content ManagementAudio Content Management
Audio Content ManagementProdigyView
 
File Content Management
File Content ManagementFile Content Management
File Content ManagementProdigyView
 
Email Configuration
Email ConfigurationEmail Configuration
Email ConfigurationProdigyView
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialProdigyView
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags TutorialProdigyView
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHPProdigyView
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHPProdigyView
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyViewProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHPProdigyView
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPProdigyView
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS LibrariesProdigyView
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements TutorialProdigyView
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design PatternProdigyView
 

More from ProdigyView (20)

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-ins
 
Building An Application
Building An ApplicationBuilding An Application
Building An Application
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing Applications
 
Video Content Management
Video Content ManagementVideo Content Management
Video Content Management
 
Audio Content Management
Audio Content ManagementAudio Content Management
Audio Content Management
 
File Content Management
File Content ManagementFile Content Management
File Content Management
 
Email Configuration
Email ConfigurationEmail Configuration
Email Configuration
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHP
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHP
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Understanding Web Cache

  • 2. What is Cache? Cache is the storing of data temporarily to improve performance. Cache exist in a variety of areas such as your CPU, Hard Disk and DNS. CPU Cache Hard Disk Cache DNS Cache www.prodigyview.com
  • 3. Our Focus Our focus on this tutorial will be web cache. Web cache is temporary storing of data that is used with delivering a webpage (html, php, javascript, etc).
  • 4. Why and How Many sites today are dynamic websites that 1. Use a database connection 2. Written with a scripting language 3. Have changing content With the amount of technology behind making these sites work combined with larges volumes of traffic going to these sites, cache is very important to improve the user experience and lowering cost of your hardware. www.prodigyview.com
  • 5. Basic Flow Without Cache Server User Database
  • 6. This Is Ok If….. 1. Not a lot of content 2. Small amount of users/pageviews This Is Bad If….. 1. Lots of contents 2. Lots of users/pageviews www.prodigyview.com
  • 7. Flow With Cache Server 2. Server gets content that is cached Database only needed to be called for new content User Database
  • 8. Cache Benefits  CPU Cycle Billing: If you are billed by the CPU Cycle, cache can save you money because less of the cpu is used when reading a file rather than a complex database query.  Bottleneck: If there is a bottleneck on your web service such as with your database, not calling the database as often and using cached database queries could help with that bottleneck  Faster UI: Storing cached files, whether in a file in the browser or a location on the server, can lower the amount of time need to load a page. This can make a faster user experience. www.prodigyview.com
  • 9. Basic Caching Methods  Headers: PHP has a cache option set in the headers. This can be useful for caching external files such as JavaScript and CSS files.  Basic File Cache: Basic file cache is an easy to implement solution for writing and reading cache on a server.  Memcache: A PHP extension for caching files on multiple servers.  Cache Lite: A PHP extension installed through PEAR that caches whole pages or sections of pages.  APC : APC, short for Alternative PHP Cache, is another php extension that cache’s PHP code. It is installed through PECL. www.prodigyview.com
  • 10. Higher Level Caching  Varnish: A HTTP accelerator(reverse proxy) that caches data in virtual memory.  Squid: A caching server that can cache DNS, FTP, HTTPS, HTTP, TSL, and SSL protocols.  Apache Traffic Server: A reverse proxy and forward proxy caching server that despite its name, works with Nginx.  XtraDB: If you are using a Mysql database, this caching solution can help optimize performance of your database better than the standard InnoDB. www.prodigyview.com
  • 11. Server Cache(Squid or Varnish) Server The actual server and the database server are not called unless new content 1. User request goes to server is needed Cache Server 2. Cache servers returns cached data User Database
  • 12. Database Cache Server User 3. Use cached query Database
  • 13. Review As you can see, caching can occur at many levels.  Database (ex: XtraDB)  Server ( ex: Memcache)  DNS/Networks ( ex: Squid)  Client’s Browser (ex: Headers) Take the time to research these solutions further to see how can they improve your site’s performance. www.prodigyview.com
  • 14. ProdigyView and Caching  Natively, ProdigyView offers two type of caching: file cache and memcache. Bot are easy to setup and use.  Caching solutions can be extended by using a third party caching solution or writing an adapter that will change how the cache works. www.prodigyview.com
  • 15. API Reference For a better understanding of cache in ProdigyView, visit the api by clicking on the link below. PVCache More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com