{"id":5962,"date":"2015-05-21T09:49:49","date_gmt":"2015-05-21T09:49:49","guid":{"rendered":"http:\/\/www.esds.co.in\/blog\/?p=5962"},"modified":"2021-03-03T11:20:42","modified_gmt":"2021-03-03T11:20:42","slug":"examples-of-use-of-the-cache","status":"publish","type":"post","link":"https:\/\/www.esds.co.in\/blog\/examples-of-use-of-the-cache\/","title":{"rendered":"Examples of use of the Cache"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"322\" src=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/cache.jpg\" alt=\"cache\" class=\"wp-image-5963\" srcset=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/cache.jpg 800w, https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/cache-300x121.jpg 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align: justify;\">Today, we are continuing our journey to know more about various types of Cache. In previous article we have seen (<strong><a href=\"https:\/\/www.esds.co.in\/blog\/how-many-types-of-cache-do-you-know\/\" target=\"_blank\" rel=\"noopener noreferrer\">How Many Types of Cache do you know?<\/a><\/strong>) some examples to understand what exactly Cache stands for along with Client and Server side Cache structure.<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.esds.co.in\/blog\/examples-of-use-of-the-cache\/#1_DNS_Cache\" >1) DNS Cache:<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.esds.co.in\/blog\/examples-of-use-of-the-cache\/#2_Caching_proxy_servers\" >2) Caching proxy servers:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.esds.co.in\/blog\/examples-of-use-of-the-cache\/#3_Browser_cache\" >3) Browser cache:<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.esds.co.in\/blog\/examples-of-use-of-the-cache\/#4_Dynamic_Page_Cache\" >4) Dynamic Page Cache:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.esds.co.in\/blog\/examples-of-use-of-the-cache\/#5_Database_Query_Cache\" >5) Database Query Cache:<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<p style=\"text-align: justify;\">Here, we will see some more example of use of the Cache to get familiar with technology or you can say principle frequently using caching, either at server as client (and sometimes both):<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_DNS_Cache\"><\/span><strong>1) DNS Cache:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft\"><a href=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/DNS-Cache.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"278\" height=\"210\" src=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/DNS-Cache.jpg\" alt=\"DNS Cache\" class=\"wp-image-5969\"\/><\/a><\/figure><\/div>\n\n\n\n<p style=\"text-align: justify;\">Before any web transfer such as when you visit a website, for an instance <strong><a href=\"http:\/\/www.esds.co.in\/\">http:\/\/www.esds.co.in\/<\/a>,<\/strong> our server will perform a DNS query to translate ESDS.co.in to an IP address. This is a behavior that is consistent for each web page and every website. It is therefore logical that a cache is set up at this location. Indeed, it exists on all operating system and also on browsers DNS cache that have the function of cache handler &lt;-&gt; (ESDS.co.in &lt;-&gt; xx.xx.xx.xxx).<\/p>\n\n\n\n<p style=\"text-align: justify;\">So when you visit a website again DNS cache allows not having to re-perform a DNS query and you can access web pages more quickly because cached information will be obtained more quickly than requesting a DNS server on the web.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Caching_proxy_servers\"><\/span><strong>2) Caching proxy servers:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft\"><a href=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/proxy_server_caching.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"297\" src=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/proxy_server_caching.jpg\" alt=\"proxy_server_caching\" class=\"wp-image-5970\" srcset=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/proxy_server_caching.jpg 400w, https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/proxy_server_caching-300x223.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/figure><\/div>\n\n\n\n<p style=\"text-align: justify;\">Proxy server, which are intermediaries between clients and servers (either between the local network and the Internet or between two Internet sites) also often make caching to make access to information faster for clients. The advantage is that caching is now centralized in a single point and can then be used by multiple clients performing the same query.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Browser_cache\"><\/span><strong>3) Browser cache:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p style=\"text-align: justify;\">Web browsers, as we have seen in the previous part, often use of catching regarding the JavaScript, CSS files or images to a website. The administrator of a website can also specify parameters for customers showing them how long they can keep a particular type of file caching. This allows for a temporary caching but which provides a performance gain and resource saving for both the client and the server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Dynamic_Page_Cache\"><\/span><strong>4) Dynamic Page Cache:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft\"><a href=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/chicago-tech-day-jan-2015-hidden-features-13-638.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"303\" src=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/chicago-tech-day-jan-2015-hidden-features-13-638.jpg\" alt=\"dynamic page caching\" class=\"wp-image-5972\" srcset=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/chicago-tech-day-jan-2015-hidden-features-13-638.jpg 442w, https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/chicago-tech-day-jan-2015-hidden-features-13-638-300x206.jpg 300w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><\/a><\/figure><\/div>\n\n\n\n<p style=\"text-align: justify;\">Web server side, a cache can also be set up to not having to regenerate pages that are normally dynamically generated as is the case with most websites today. Using PHP and similar languages allow modularity of websites, but also generate significant resource consumption, since the pages are generated for each request to be built and sent to the client.<\/p>\n\n\n\n<p style=\"text-align: justify;\">Fortunately, caching avoids for the same requested page containing the same information to regenerate a page, but rather to make an already calculated cached page to customers. Some tools can be positioned directly on the web server and other more substantial and used for large trades, which are positioned for upstream flow or for web servers. Then they also act as reverse proxy, for example, the case of Varnish cache.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Database_Query_Cache\"><\/span><strong>5) Database Query Cache:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"345\" src=\"https:\/\/www.esds.co.in\/blog\/wp-content\/uploads\/2015\/05\/cache1.gif\" alt=\"database cache\" class=\"wp-image-5973\"\/><\/figure><\/div>\n\n\n\n<p style=\"text-align: justify;\">Again in web server, they almost constantly use databases to schedule and sort their information. Each generation of page causes a content search in the database. Therefore, it is often useful to cache the responses from the database to make it faster page generation. This is for example what the DB Cache Reloaded plugin does in WordPress.<\/p>\n\n\n\n<p>&nbsp;<strong>Conclusion:<\/strong><\/p>\n\n\n\n<p style=\"text-align: justify;\">We have seen 6 types of Cache, their purpose and structure along with examples to understand them appropriately. So when the next time you see or hear this term you will think of a lot can happen over a simple looking word i.e. Cache.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, we are continuing our journey to know more about various types of Cache. In previous article we have seen (How Many Types of Cache do you know?) some examples to understand what exactly Cache stands for along with Client and Server side Cache structure. Here, we will see some more example of use of&#8230; <\/p>\n<div class=\"clear\"><\/div>\n<p><a href=\"https:\/\/www.esds.co.in\/blog\/examples-of-use-of-the-cache\/\" class=\"gdlr-button small excerpt-read-more\">Read More<\/a><\/p>\n","protected":false},"author":24,"featured_media":5963,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6],"tags":[1296,1295,1297,1704],"class_list":["post-5962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dedicated-server-hosting","tag-database-query-cache","tag-dns-cache","tag-dynamic-page-cache","tag-proxy-server"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/posts\/5962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/comments?post=5962"}],"version-history":[{"count":72,"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/posts\/5962\/revisions"}],"predecessor-version":[{"id":11864,"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/posts\/5962\/revisions\/11864"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/media\/5963"}],"wp:attachment":[{"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/media?parent=5962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/categories?post=5962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esds.co.in\/blog\/wp-json\/wp\/v2\/tags?post=5962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}