<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gj |</title>
	<atom:link href="https://blog.gaiterjones.com/category/memcached/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.gaiterjones.com/category/memcached/</link>
	<description>gaiterjones</description>
	<lastBuildDate>Fri, 24 Feb 2017 13:03:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.3</generator>
	<item>
		<title>Magento Page Load Time and Cache Performance</title>
		<link>https://blog.gaiterjones.com/magento-page-load-time-and-cache-performance/</link>
					<comments>https://blog.gaiterjones.com/magento-page-load-time-and-cache-performance/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 03 Jul 2015 12:46:27 +0000</pubDate>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Cache Management]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[redis]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1368</guid>

					<description><![CDATA[Having implemented a Magento REDIS cache management solution I wanted to see what effect using the Magento cache had on page load times. To measure the Magento page load time...<a class="more-link" href="https://blog.gaiterjones.com/magento-page-load-time-and-cache-performance/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>Having implemented a <a href="https://blog.gaiterjones.com/magento-redis-system-session-and-full-page-cache-management-solution/">Magento REDIS cache management solution</a> I wanted to see what effect using the Magento cache had on page load times. To measure the Magento page load time I load the page into an iFrame, refresh the iFrame and measure the load time over an average of 10 page refreshes.</p>
<p>Here are the results of the test</p>
<h2>Page Load Times</h2>
<p><img decoding="async" class="aligncenter size-large wp-image-1369" src="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-620x95.jpg" alt="magento-cache-system-page-load-times" width="550" height="84" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-620x95.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-440x67.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-550x84.jpg 550w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times.jpg 712w" sizes="(max-width: 550px) 100vw, 550px" /></p>
<ul>
<li>Enabling the system cache using REDIS showed a <strong>59%</strong> increase in the home page load time.
<ul>
<li>Enabling the FPC cache using REDIS showed further <strong>28%</strong> increase, a total <strong>71%</strong> increase.</li>
</ul>
</li>
<li>Enabling the system cache using REDIS showed a <strong>39%</strong> increase in a category page load time.
<ul>
<li>Enabling the FPC cache using REDIS showed further <strong>48%</strong> increase, a total <strong>69%</strong> increase.</li>
</ul>
</li>
<li>Enabling the system cache using REDIS showed a <strong>20%</strong> increase in a product page load time.
<ul>
<li>Enabling the FPC cache using REDIS showed further <strong>20%</strong> increase, a total <strong>37%</strong> increase.</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<h2>Graphs</h2>
<p>These are the graphs showing the page load times for the Magento home page.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-large wp-image-1372" src="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-1-620x438.jpg" alt="magento-cache-system-page-load-times-home-1" width="550" height="389" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-1-620x438.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-1-440x311.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-1-760x536.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-1-550x388.jpg 550w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-1.jpg 850w" sizes="(max-width: 550px) 100vw, 550px" /></p>
<p><img decoding="async" class="aligncenter size-large wp-image-1371" src="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-2-620x438.jpg" alt="magento-cache-system-page-load-times-home-2" width="550" height="389" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-2-620x438.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-2-440x311.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-2-760x536.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-2-550x388.jpg 550w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-2.jpg 850w" sizes="(max-width: 550px) 100vw, 550px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1370" src="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-3-620x438.jpg" alt="magento-cache-system-page-load-times-home-3" width="550" height="389" srcset="https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-3-620x438.jpg 620w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-3-440x311.jpg 440w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-3-760x536.jpg 760w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-3-550x388.jpg 550w, https://blog.gaiterjones.com/wp-content/uploads/2015/07/magento-cache-system-page-load-times-home-3.jpg 850w" sizes="(max-width: 550px) 100vw, 550px" /></p>
<h2>Summary</h2>
<p>It is clear from these page load times that caching does significantly improve Magento responsiveness with a noted increase in load time here of up to 70%. The increase in page load time is not consistent across all page types,  some pages, i.e. product pages require more processing to render and so take longer.</p>
<h3>Memcache vs Redis</h3>
<p>Testing pageload times using memcache and redis as a Magento system cache store there was no noticeable difference between the two storage systems.</p>
<h2>Magento Page load time tool</h2>
<p>You can try out the iFrame page load time tool <a href="http://dev.gaiterjones.com/dropdev/PAJ/www/PageLoadTime/index.phtml?url=https://blog.gaiterjones.com/" target="_blank">here</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-page-load-time-and-cache-performance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Efficient Page View Counter using PHP and Memcache</title>
		<link>https://blog.gaiterjones.com/efficient-page-view-counter-using-php-and-memcache/</link>
					<comments>https://blog.gaiterjones.com/efficient-page-view-counter-using-php-and-memcache/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 08 Mar 2013 13:04:01 +0000</pubDate>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=899</guid>

					<description><![CDATA[Are you looking for the most efficient way to increment a counter to use on a web page e.g. to display specific page views or amount of times an object...<a class="more-link" href="https://blog.gaiterjones.com/efficient-page-view-counter-using-php-and-memcache/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>Are you looking for the most efficient way to increment a counter to use on a web page e.g. to display specific page views or amount of times an object is requested? Memcache provides a really fast method of incrementing a simple counter. You can then decide to sync the counter data to your database when required, i.e. every 100 views. The demonstration below uses my <a title="PHP Memcache &amp; MYSQL Wrapper Classes" href="https://blog.gaiterjones.com/php-memcache-mysql-wrapper-classes/">DB and memcache PHP wrapper classes</a> to increment a simple counter held in a mysql table and incremented via memcache.</p>
<div class="iframe-container"><iframe src="http://dev2.medazzaland.co.uk/dropdev/memcache-page-counter/"></iframe></div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/efficient-page-view-counter-using-php-and-memcache/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PHP Memcache &#038; MYSQL Wrapper Classes</title>
		<link>https://blog.gaiterjones.com/php-memcache-mysql-wrapper-classes/</link>
					<comments>https://blog.gaiterjones.com/php-memcache-mysql-wrapper-classes/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 27 Feb 2013 16:06:07 +0000</pubDate>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=880</guid>

					<description><![CDATA[I needed to implement some cacheing on a website I was developing and looked around for some PHP solutions to cache the data I was generating from multiple different sql...<a class="more-link" href="https://blog.gaiterjones.com/php-memcache-mysql-wrapper-classes/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>I needed to implement some cacheing on a website I was developing and looked around for some PHP solutions to cache the data I was generating from multiple different sql queries per page. Memcache was an obvious solution but I could not find anything that fitted nicely with my existing PHP code. Ideally I just wanted to take existing sql queries and convert them to use, where available the memcache cache, and where not available to simply query the database.</p>
<p>Having spent a day or so Googling around I developed a memcache php wrapper class that I can use in conjunction with my existing database classes.</p>
<p>The memcache class can be used standalone for normal cacheing of data, but in conjunction with the DB wrapper it is allows you to simply pass a query to a function that returns all rows in an array either via the database or the memcached cache. You can decide manually if you want to query via memcache or directly, you can also simply switch memcache off or on as required. The process is failsafe, if the memcache server dies then queries automatically will stop using memcache and use the database.</p>
<p>The memcache wrapper implements name space and name space versioning to manage the memcache data keys. The name space represents your data set. A name space version is stored in the memcache and by simply incrementing the version number of the name space for your data, you change the name of the current dataset namespace key which invalidates the cache and forces a new cached data set entry to be created. Old keys will be deleted as they expire. You can see this process in action using the live demo below. My default TTL is currently set at 5 minutes. Note whether the data comes from the cache or the database, refresh the data or increment the name space key version to see how new keys are created.</p>
<p>I am still monitoring this implementation to ensure the cache is working as expected, it is clearly faster for some pages where I was returning large rows of fairly static data from the database to populate the page. However one must be careful to only cache where required, not all queries will benefit from being cached. You must remember to increment the name space key version whenever you update a table represented by the namespace, otherwise you will only see cached data! It is also important to ensure that the TTL for the key holding the name space version is longer than that of your actual data keys in the demo I set the keys used to hold version numbers to expire after 30 days.</p>
<p>This version is using the memcache api and not memcached. And I do also realise it is bad practise to still be using Mysql for new developments and I will be migrating my sql code to a new api ASAP I promise&#8230;</p>
<p>Any comments on the approach to using memcache to cache db queries developed here would be more than welcome.</p>
<p>You can download the code and classes used to create the demo below <a href="https://blog.gaiterjones.com/dev/extension.php?id=c0a84d3a2570e5bba646726af7456131" target="_blank">here</a>.</p>
<div class="iframe-container"><iframe loading="lazy" src="http://dev2.medazzaland.co.uk/dropdev/memcache/" width="300" height="150"></iframe></div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/php-memcache-mysql-wrapper-classes/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
