{"id":1287,"date":"2012-05-09T10:00:00","date_gmt":"2012-05-09T10:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/java-memcached-on-mac-os-x.html"},"modified":"2012-10-22T05:16:23","modified_gmt":"2012-10-22T05:16:23","slug":"java-memcached-on-mac-os-x","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html","title":{"rendered":"Java Memcached on Mac OS X"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\"><strong>Introduction<\/strong><\/p>\n<p>In this article I will explain how you can:<\/p>\n<ol>\n<li>Install and Configure Memcached on Mac OS X<\/li>\n<li>Use Memcached in your Java Application<\/li>\n<\/ol>\n<p>I won&#8217;t go in too much detail about the benefits of using a distributed cache in your applications, but let&#8217;s at least provide some use cases for applications that are running in the context of an enterprise portal, eXo Platform in my case &#8211;  <i>surprising isn&#8217;t?<\/i> And I will show this in another post.  <\/p>\n<p>We have many reasons to use a cache (distributed or not), in the context of enterprise portal, let&#8217;s take a look to some of these reasons: <\/p>\n<ul>\n<li>A portal is used to aggregate data in a single page. These data could come from different sources : Web Services, Database, ERP, &#8230;.. and accessing the data in real time could be costly. So it will be quite interesting to cache the result of the call when possible.<\/li>\n<li>If the portal is used to aggregate many data from many sources, it is sometime necessary to jump into another application to continue some operation. A distributed and shared cache could be used to manage some context between different applications running in different processes (JVM or even technologies)<\/li>\n<\/ul>\n<p>These are two example where a shared cache could be interesting for your portal based applications, we can find many other reason. <\/p>\n<p>Note that the Portlet API (JSR-286) contains already a cache mechanism that cache the HTML fragment, and that eXo Platform also provide a  <a href=\"http:\/\/docs.jboss.org\/exojcr\/1.14.0-CR4\/developer\/en-US\/html\/ch-cache.html\">low level cache<\/a>, based on  <a href=\"http:\/\/www.jboss.org\/jbosscache\">JBoss Cache<\/a>.  <\/p>\n<p><strong>Installation and Configuration <\/strong><\/p>\n<p><strong>Installing Memcached from sources <\/strong><\/p>\n<p>You can find some information about Memcached installation on the Memcached  <a href=\"http:\/\/code.google.com\/p\/memcached\/wiki\/NewStart\">Wiki<\/a>. The following steps are the steps that I have used on my environment. <\/p>\n<p>As far as I know, Memached is not available as package for Mac OS X. I am still on Snow Leopard (10.6.8), and I have installed XCode and all development tools. I have use the article &#8220;Installing memcached 1.4.1 on Mac OS X 10.6 Snow Leopard&#8221; from  <a href=\"https:\/\/wincent.com\/wiki\/Installing_memcached_1.4.1_on_Mac_OS_X_10.6_Snow_Leopard\">wincent.com<\/a>. For simplicity reason I have duplicate the content and updated to the latest releases. <\/p>\n<p>1. Create a working directory :  <\/p>\n<pre class=\"brush:bash\">$ mkdir memcachedbuild\r\n$ cd memcachebuild<\/pre>\n<p>2.Install  <a href=\"http:\/\/libevent.org\/\">libevent<\/a> that is mandatory for memcached <\/p>\n<pre class=\"brush:bash\">$ curl -O http:\/\/www.monkey.org\/~provos\/libevent-1.4.14-stable.tar.gz\r\n$ tar xzvf libevent-1.4.14-stable.tar.gz\r\n$ cd libevent-1.4.14-stable\r\n$ .\/configure\r\n$ make\r\n$ make verify\r\n$ sudo make install \r\n<\/pre>\n<p>3. Install memcached  <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Go back to your install directory ( <i>memcachedbuild<\/i>) <\/p>\n<pre class=\"brush:bash\">$ curl -O http:\/\/memcached.googlecode.com\/files\/memcached-1.4.10.tar.gz\r\n$ tar xzvf memcached-1.4.10.tar.gz\r\n$ cd memcached-1.4.10\r\n$ .\/configure\r\n$ make\r\n$ make test\r\n$ sudo make install \r\n<\/pre>\n<p>You are now ready to use memcached that is available at  \/usr\/local\/bin\/memcached <\/p>\n<p>This allows you to avoid changing to the pre-installed memcached located in \/usr\/bin, if you want to replace it instead of having you own install, just run the configure command with the following parameter:  .\/configure &#8211;prefix=\/usr <\/p>\n<p><strong>Starting and testing Memcached<\/strong><\/p>\n<p>Start the memcached server, using the following command line:  <\/p>\n<pre class=\"brush:bash\">$ \/usr\/local\/bin\/memcached -d -p 11211<\/pre>\n<p>This command starts the memcached server as demon (-d parameter), on the TCP port 11211 (this is the default value). You can find more about the memcached command using  man memcached. <\/p>\n<p>It is possible to connect and test your server using a telnet connection. Once connected you can set and get object in the cache, take a look to the following paragraph. <\/p>\n<pre class=\"brush:bash\">$ telnet 127.0.0.1 11211\r\nTrying 127.0.0.1...\r\nConnected to tgrall-server.\r\nEscape character is '^]'.\r\nset KEY 0 600 16\r\nThis is my value\r\nSTORED\r\nget KEY\r\nVALUE KEY 0 16\r\nThis is my value\r\nEND\r\n<\/pre>\n<p>The  set command allows you to put a new value in the cache using the following syntax: <\/p>\n<pre class=\"brush:bash\">set &lt;key&gt; &lt;flags&gt; &lt;expiration_time&gt; &lt;number_of_bytes&gt; [noreply]\r\n\r\n&lt;value&gt;<\/pre>\n<ul>\n<li>key : the key used to store the data in the cache\n <\/li>\n<li>flags : a 32 bits unsigned integer that memcached stored with the data<\/li>\n<li>expiration_time : expiration time in seconds, if you put 0 this means no delay <\/li>\n<\/ul>\n<ul>\n<li>number_if_bytes : number of bytes in the data block<\/li>\n<li>noreply : option to tell the server to not return any value<\/li>\n<li>value : the value to store and associate to the key.<\/li>\n<\/ul>\n<p>This is a short view of the documentation located in your source directory  \/memcachedbuild\/memcached-1.4.10\/doc\/protocol.txt .  <\/p>\n<p>The  get command allows you to access the value that is associated with the key. <\/p>\n<p>You can check the version of memcahed you are running by calling the  stats command in your telnet session. <\/p>\n<p>Your memcached server is up and running, you can now start to use it inside your applications. <\/p>\n<p><strong>Simple Java Application with Memcached <\/strong><\/p>\n<p>The easiest way to use memcached from your Java applications is to use a client library. You can find many  <a href=\"http:\/\/code.google.com\/p\/memcached\/wiki\/Clients#Java\" target=\"_blank\">client libraries<\/a>. In this example I am using  <a href=\"http:\/\/code.google.com\/p\/spymemcached\/\" target=\"_blank\">spymemcached<\/a> developped by the people from  <a href=\"http:\/\/www.couchbase.com\/\" target=\"_blank\">Couchbase<\/a>. <\/p>\n<p>1. Adding SpyMemcached to your Maven project <\/p>\n<p>Add the repository to you pom.xml (or you setting.xml) <\/p>\n<pre class=\"brush:xml\">&lt;repository&gt;\r\n    &lt;id&gt;spy&lt;\/id&gt;\r\n    &lt;name&gt;Spy Repository&lt;\/name&gt;\r\n    &lt;layout&gt;default&lt;\/layout&gt;\r\n    &lt;url&gt;http:\/\/files.couchbase.com\/maven2\/&lt;\/url&gt;\r\n&lt;\/repository&gt;<\/pre>\n<p>then the dependency to your pom.xml <\/p>\n<pre class=\"brush:xml\">&lt;dependency&gt;\r\n    &lt;groupid&gt;spy&lt;\/groupid&gt;\r\n    &lt;artifactid&gt;spymemcached&lt;\/artifactid&gt;\r\n    &lt;version&gt;2.7.3&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<p>2. Use SpyMemcache client in your application <\/p>\n<p>The following code is a simple Java class that allows you to enter the key and the value and set it in the cache. <\/p>\n<pre class=\"brush:java\">package com.grallandco.blog;\r\n\r\nimport java.io.BufferedReader;\r\nimport java.io.IOException;\r\nimport java.io.Console;\r\nimport java.io.InputStreamReader;\r\nimport java.util.Date;\r\nimport java.util.logging.Level;\r\nimport java.util.logging.Logger;\r\nimport net.spy.memcached.AddrUtil;\r\nimport net.spy.memcached.MemcachedClient;\r\n\r\npublic class Test {\r\n\r\n    public static void main(String[] args) {\r\n       try {\r\n           \r\n           System.out.print(\"Enter the new key : \");\r\n           BufferedReader reader = new BufferedReader( new InputStreamReader(System.in));\r\n           String key = null;\r\n           key = reader.readLine();\r\n           \r\n           System.out.print(\"Enter the new value : \");\r\n           String value = null;\r\n           value = reader.readLine();\r\n           \r\n            MemcachedClient cache = new MemcachedClient(AddrUtil.getAddresses(\"127.0.0.1:11211\"));\r\n            \r\n            \/\/ read the object from memory\r\n            System.out.println(\"Get Object before set :\"+ cache.get(key)  );\r\n\r\n            \/\/ set a new object            \r\n            cache.set(key, 0, value );\r\n\r\n            System.out.println(\"Get Object after set :\"+ cache.get(key)  );\r\n            \r\n\r\n        } catch (IOException ex) {\r\n            Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);\r\n            System.exit(0);\r\n        }\r\n\r\n       \r\n        System.exit(0);\r\n       \r\n    }\r\n}\r\n<\/pre>\n<p>So when executing the application you will see something like : <\/p>\n<pre class=\"brush:bash\">Enter the new key : CITY\r\nEnter the new value : Paris, France\r\n2011-11-16 15:22:09.928 INFO net.spy.memcached.MemcachedConnection:  Added {QA sa=\/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue\r\n2011-11-16 15:22:09.932 INFO net.spy.memcached.MemcachedConnection:  Connection state changed for sun.nio.ch.SelectionKeyImpl@5b40c281\r\nGet Object before set :null\r\nGet Object after set :Paris, France\r\n<\/pre>\n<p>You can also access the object from a Telnet session:  <\/p>\n<pre class=\"brush:bash\">get CITY\r\nVALUE CITY 0 13\r\nParis, France\r\nEND\r\n<\/pre>\n<p>You can use any Java class in your application, the only thing to do is to make this class serializable.  <\/p>\n<p>This is it for the first post about memcached and Java, I am currently working on a small example integrating Web Services call, Portlets and memcached.   <\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/tugdualgrall.blogspot.com\/2011\/11\/installing-memcached-on-mac-os-x-and.html\">Installing Memcached on Mac OS X and using it in Java<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Tugdual Grall  at the <a href=\"http:\/\/tugdualgrall.blogspot.com\/\">Tug&#8217;s Blog<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this article I will explain how you can: Install and Configure Memcached on Mac OS X Use Memcached in your Java Application I won&#8217;t go in too much detail about the benefits of using a distributed cache in your applications, but let&#8217;s at least provide some use cases for applications that are running &hellip;<\/p>\n","protected":false},"author":211,"featured_media":184,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[182,507],"class_list":["post-1287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-mac-os","tag-memcached"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java Memcached on Mac OS X - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Introduction In this article I will explain how you can: Install and Configure Memcached on Mac OS XUse Memcached in your Java ApplicationI won&#039;t go in\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Memcached on Mac OS X - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Introduction In this article I will explain how you can: Install and Configure Memcached on Mac OS XUse Memcached in your Java ApplicationI won&#039;t go in\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/tgrall\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-09T10:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T05:16:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/memcached-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tugdual Grall\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/tgrall\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tugdual Grall\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html\"},\"author\":{\"name\":\"Tugdual Grall\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/b52921fffd460d1dd6c706aab3408681\"},\"headline\":\"Java Memcached on Mac OS X\",\"datePublished\":\"2012-05-09T10:00:00+00:00\",\"dateModified\":\"2012-10-22T05:16:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html\"},\"wordCount\":836,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/memcached-logo.jpg\",\"keywords\":[\"Mac OS\",\"Memcached\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html\",\"name\":\"Java Memcached on Mac OS X - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/memcached-logo.jpg\",\"datePublished\":\"2012-05-09T10:00:00+00:00\",\"dateModified\":\"2012-10-22T05:16:23+00:00\",\"description\":\"Introduction In this article I will explain how you can: Install and Configure Memcached on Mac OS XUse Memcached in your Java ApplicationI won't go in\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/memcached-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/memcached-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/java-memcached-on-mac-os-x.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java Memcached on Mac OS X\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/b52921fffd460d1dd6c706aab3408681\",\"name\":\"Tugdual Grall\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/af1b68cee45f3bf495c2cd03b3a14abbb56b53dcad9ef92afc7d387842ef9d72?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/af1b68cee45f3bf495c2cd03b3a14abbb56b53dcad9ef92afc7d387842ef9d72?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/af1b68cee45f3bf495c2cd03b3a14abbb56b53dcad9ef92afc7d387842ef9d72?s=96&d=mm&r=g\",\"caption\":\"Tugdual Grall\"},\"description\":\"Tugdual Grall, an open source advocate and a passionate developer, is a Chief Technical Evangelist EMEA at MapR. He currently works with the European developer communities to ease MapR, Hadoop, and NoSQL adoption. Before joining MapR, Tug was Technical Evangelist at MongoDB and Couchbase. Tug has also worked as CTO at eXo Platform and JavaEE product manager, and software engineer at Oracle. Tugdual is Co-Founder of the Nantes JUG (Java User Group) that holds since 2008 monthly meeting about Java ecosystem. Tugdual also writes a blog available at http:\\\/\\\/tgrall.github.io\\\/\",\"sameAs\":[\"http:\\\/\\\/tgrall.github.io\\\/\",\"https:\\\/\\\/www.facebook.com\\\/tgrall\",\"http:\\\/\\\/www.linkedin.com\\\/in\\\/tugdualgrall\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/tgrall\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/tugdual-grall\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Memcached on Mac OS X - Java Code Geeks","description":"Introduction In this article I will explain how you can: Install and Configure Memcached on Mac OS XUse Memcached in your Java ApplicationI won't go in","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html","og_locale":"en_US","og_type":"article","og_title":"Java Memcached on Mac OS X - Java Code Geeks","og_description":"Introduction In this article I will explain how you can: Install and Configure Memcached on Mac OS XUse Memcached in your Java ApplicationI won't go in","og_url":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/tgrall","article_published_time":"2012-05-09T10:00:00+00:00","article_modified_time":"2012-10-22T05:16:23+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/memcached-logo.jpg","type":"image\/jpeg"}],"author":"Tugdual Grall","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/tgrall","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Tugdual Grall","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html"},"author":{"name":"Tugdual Grall","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/b52921fffd460d1dd6c706aab3408681"},"headline":"Java Memcached on Mac OS X","datePublished":"2012-05-09T10:00:00+00:00","dateModified":"2012-10-22T05:16:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html"},"wordCount":836,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/memcached-logo.jpg","keywords":["Mac OS","Memcached"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html","url":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html","name":"Java Memcached on Mac OS X - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/memcached-logo.jpg","datePublished":"2012-05-09T10:00:00+00:00","dateModified":"2012-10-22T05:16:23+00:00","description":"Introduction In this article I will explain how you can: Install and Configure Memcached on Mac OS XUse Memcached in your Java ApplicationI won't go in","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/memcached-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/memcached-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/java-memcached-on-mac-os-x.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Java Memcached on Mac OS X"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/b52921fffd460d1dd6c706aab3408681","name":"Tugdual Grall","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/af1b68cee45f3bf495c2cd03b3a14abbb56b53dcad9ef92afc7d387842ef9d72?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/af1b68cee45f3bf495c2cd03b3a14abbb56b53dcad9ef92afc7d387842ef9d72?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/af1b68cee45f3bf495c2cd03b3a14abbb56b53dcad9ef92afc7d387842ef9d72?s=96&d=mm&r=g","caption":"Tugdual Grall"},"description":"Tugdual Grall, an open source advocate and a passionate developer, is a Chief Technical Evangelist EMEA at MapR. He currently works with the European developer communities to ease MapR, Hadoop, and NoSQL adoption. Before joining MapR, Tug was Technical Evangelist at MongoDB and Couchbase. Tug has also worked as CTO at eXo Platform and JavaEE product manager, and software engineer at Oracle. Tugdual is Co-Founder of the Nantes JUG (Java User Group) that holds since 2008 monthly meeting about Java ecosystem. Tugdual also writes a blog available at http:\/\/tgrall.github.io\/","sameAs":["http:\/\/tgrall.github.io\/","https:\/\/www.facebook.com\/tgrall","http:\/\/www.linkedin.com\/in\/tugdualgrall","https:\/\/x.com\/http:\/\/twitter.com\/tgrall"],"url":"https:\/\/www.javacodegeeks.com\/author\/tugdual-grall"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/211"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1287"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1287\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/184"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}