<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: A rant about proper memcache usage</title>
	<atom:link href="http://joped.com/2009/03/a-rant-about-proper-memcache-usage/feed/" rel="self" type="application/rss+xml" />
	<link>http://joped.com/2009/03/a-rant-about-proper-memcache-usage/</link>
	<description>Grumpy geek from Jersey living in San Francisco</description>
	<lastBuildDate>Mon, 24 Aug 2009 10:40:29 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bartek</title>
		<link>http://joped.com/2009/03/a-rant-about-proper-memcache-usage/comment-page-1/#comment-3274</link>
		<dc:creator>Bartek</dc:creator>
		<pubDate>Mon, 24 Aug 2009 10:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://joped.com/?p=129#comment-3274</guid>
		<description>Number of arguments vary - this is a huge app with hundreds of business logic methods (and business layer is cached in the way described). Sometimes arguments are array of values. I cannot put that into key name as plain text - I need to make an unique hash somehow.

I do not delete cache entries and don&#039;t need to understand what particular key stands for. Cache entries have short expire of 60 seconds and that&#039;s enough in terms of deletion. All I am concerned of is performance = how much I could gain riping off md5 and what to chose instead. Thanks</description>
		<content:encoded><![CDATA[<p>Number of arguments vary &#8211; this is a huge app with hundreds of business logic methods (and business layer is cached in the way described). Sometimes arguments are array of values. I cannot put that into key name as plain text &#8211; I need to make an unique hash somehow.</p>
<p>I do not delete cache entries and don&#8217;t need to understand what particular key stands for. Cache entries have short expire of 60 seconds and that&#8217;s enough in terms of deletion. All I am concerned of is performance = how much I could gain riping off md5 and what to chose instead. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joped</title>
		<link>http://joped.com/2009/03/a-rant-about-proper-memcache-usage/comment-page-1/#comment-3243</link>
		<dc:creator>Joped</dc:creator>
		<pubDate>Fri, 21 Aug 2009 18:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://joped.com/?p=129#comment-3243</guid>
		<description>Depending on the number of arguments you are passing, you might want to consider listing out each parameter manually in the key name.  For example:  mykey_$sort_$order_$limit_$value1_$value2_$other

Its also much easier to perform a delete against a key like that in another part of your code.  Unless you have a method for every key you create, which is kinda overboard.

Not to mention, it would also be much harder to understand what user_c4ca4238a0b923820dcc509a6f75849b is vs user_c81e728d9d4c2f636f067f89cc14862c when looking at memcached -vv or other debug tools.

It takes a little more work, but its all about key organization.</description>
		<content:encoded><![CDATA[<p>Depending on the number of arguments you are passing, you might want to consider listing out each parameter manually in the key name.  For example:  mykey_$sort_$order_$limit_$value1_$value2_$other</p>
<p>Its also much easier to perform a delete against a key like that in another part of your code.  Unless you have a method for every key you create, which is kinda overboard.</p>
<p>Not to mention, it would also be much harder to understand what user_c4ca4238a0b923820dcc509a6f75849b is vs user_c81e728d9d4c2f636f067f89cc14862c when looking at memcached -vv or other debug tools.</p>
<p>It takes a little more work, but its all about key organization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bartek</title>
		<link>http://joped.com/2009/03/a-rant-about-proper-memcache-usage/comment-page-1/#comment-3238</link>
		<dc:creator>Bartek</dc:creator>
		<pubDate>Fri, 21 Aug 2009 14:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://joped.com/?p=129#comment-3238</guid>
		<description>Good points. Instead one: I still use md5 for keys. Would love to read what you suggest instead.

My keys need to include method name + arguments passed, so I am using something like:
md5( serialize( array( method name, array( arguments passed ) ) ) ) as memcache key.

This keeps my keys unique and short (as serialized arguments might be longish sometimes). What would you suggest instead of md5 in that case?</description>
		<content:encoded><![CDATA[<p>Good points. Instead one: I still use md5 for keys. Would love to read what you suggest instead.</p>
<p>My keys need to include method name + arguments passed, so I am using something like:<br />
md5( serialize( array( method name, array( arguments passed ) ) ) ) as memcache key.</p>
<p>This keeps my keys unique and short (as serialized arguments might be longish sometimes). What would you suggest instead of md5 in that case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 451 CAOS Theory &#187; The commercialisation of Memcached</title>
		<link>http://joped.com/2009/03/a-rant-about-proper-memcache-usage/comment-page-1/#comment-2234</link>
		<dc:creator>451 CAOS Theory &#187; The commercialisation of Memcached</dc:creator>
		<pubDate>Wed, 17 Jun 2009 10:13:04 +0000</pubDate>
		<guid isPermaLink="false">http://joped.com/?p=129#comment-2234</guid>
		<description>[...] things Memcached is not include a database, a queue system and a [...]</description>
		<content:encoded><![CDATA[<p>[...] things Memcached is not include a database, a queue system and a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Henry</title>
		<link>http://joped.com/2009/03/a-rant-about-proper-memcache-usage/comment-page-1/#comment-2107</link>
		<dc:creator>Chris Henry</dc:creator>
		<pubDate>Sat, 06 Jun 2009 19:06:26 +0000</pubDate>
		<guid isPermaLink="false">http://joped.com/?p=129#comment-2107</guid>
		<description>This is a really great post on memcache best practices.  It&#039;s pretty much everything I&#039;ve learned the hard way, particularly connecting using the external IP.  That finer point will actually be causing me some pain later this month...</description>
		<content:encoded><![CDATA[<p>This is a really great post on memcache best practices.  It&#8217;s pretty much everything I&#8217;ve learned the hard way, particularly connecting using the external IP.  That finer point will actually be causing me some pain later this month&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryn</title>
		<link>http://joped.com/2009/03/a-rant-about-proper-memcache-usage/comment-page-1/#comment-1308</link>
		<dc:creator>Bryn</dc:creator>
		<pubDate>Fri, 13 Mar 2009 21:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://joped.com/?p=129#comment-1308</guid>
		<description>Spot on Joe. Good article! Now it you&#039;ll excuse me, I need to go get a .22 for that spider...</description>
		<content:encoded><![CDATA[<p>Spot on Joe. Good article! Now it you&#8217;ll excuse me, I need to go get a .22 for that spider&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
