{"id":480,"date":"2010-07-02T14:43:51","date_gmt":"2010-07-02T13:43:51","guid":{"rendered":"http:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/"},"modified":"2010-07-02T14:43:51","modified_gmt":"2010-07-02T13:43:51","slug":"cachememcachedmock-instant-in-process-memcached-mock","status":"publish","type":"post","link":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/","title":{"rendered":"Cache::Memcached::Mock, instant in-process memcached mock"},"content":{"rendered":"<p>A week ago, I wrote a <a href=\"http:\/\/search.cpan.org\/dist\/Cache-Memcached\" rel=\"nofollow\">Cache::Memcached<\/a> mock module for some complicated unit tests in this project I&#39;m working on.<\/p>\n<p>A few people asked to upload it to CPAN, so here it is:<\/p>\n<p><a href=\"http:\/\/search.cpan.org\/dist\/Cache-Memcached-Mock\" rel=\"nofollow\">Cache::Memcached::Mock v0.01 is on CPAN<\/a>.<\/p>\n<p>I didn&#39;t spend that much time polishing it and making documentation, so it&#39;s a bit rough around the edges, but you get the idea.<\/p>\n<p>You can <b>use it as a drop-in replacement for <code>Cache::Memcached<\/code><\/b> when you don&#39;t want, or can&#39;t afford, to run your own memcached daemon.<\/p>\n<p>I&#39;ve already got a feature request from a colleague: making sure <code>set()<\/code> fails if you try to store a value bigger than 1Mb.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A week ago, I wrote a Cache::Memcached mock module for some complicated unit tests in this project I&#39;m working on. A few people asked to upload it to CPAN, so here it is: Cache::Memcached::Mock v0.01 is on CPAN. I didn&#39;t spend that much time polishing it and making documentation, so it&#39;s a bit rough around [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[268,49,220,407,50],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cache::Memcached::Mock, instant in-process memcached mock - Random hacking<\/title>\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.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cache::Memcached::Mock, instant in-process memcached mock - Random hacking\" \/>\n<meta property=\"og:description\" content=\"A week ago, I wrote a Cache::Memcached mock module for some complicated unit tests in this project I&#039;m working on. A few people asked to upload it to CPAN, so here it is: Cache::Memcached::Mock v0.01 is on CPAN. I didn&#039;t spend that much time polishing it and making documentation, so it&#039;s a bit rough around [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/\" \/>\n<meta property=\"og:site_name\" content=\"Random hacking\" \/>\n<meta property=\"article:published_time\" content=\"2010-07-02T13:43:51+00:00\" \/>\n<meta name=\"author\" content=\"cosimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cosimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/\"},\"author\":{\"name\":\"cosimo\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"headline\":\"Cache::Memcached::Mock, instant in-process memcached mock\",\"datePublished\":\"2010-07-02T13:43:51+00:00\",\"dateModified\":\"2010-07-02T13:43:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/\"},\"wordCount\":122,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"keywords\":[\"cache\",\"cpan\",\"memcached\",\"mock\",\"perl\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/\",\"name\":\"Cache::Memcached::Mock, instant in-process memcached mock - Random hacking\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\"},\"datePublished\":\"2010-07-02T13:43:51+00:00\",\"dateModified\":\"2010-07-02T13:43:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cache::Memcached::Mock, instant in-process memcached mock\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\",\"name\":\"Random hacking\",\"description\":\"Assume nothing. Code defensively. Keep it simple, stupid!\",\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\",\"name\":\"cosimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"caption\":\"cosimo\"},\"logo\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cache::Memcached::Mock, instant in-process memcached mock - Random hacking","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.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/","og_locale":"en_US","og_type":"article","og_title":"Cache::Memcached::Mock, instant in-process memcached mock - Random hacking","og_description":"A week ago, I wrote a Cache::Memcached mock module for some complicated unit tests in this project I&#39;m working on. A few people asked to upload it to CPAN, so here it is: Cache::Memcached::Mock v0.01 is on CPAN. I didn&#39;t spend that much time polishing it and making documentation, so it&#39;s a bit rough around [&hellip;]","og_url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/","og_site_name":"Random hacking","article_published_time":"2010-07-02T13:43:51+00:00","author":"cosimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cosimo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#article","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/"},"author":{"name":"cosimo","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"headline":"Cache::Memcached::Mock, instant in-process memcached mock","datePublished":"2010-07-02T13:43:51+00:00","dateModified":"2010-07-02T13:43:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/"},"wordCount":122,"commentCount":0,"publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"keywords":["cache","cpan","memcached","mock","perl"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/","url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/","name":"Cache::Memcached::Mock, instant in-process memcached mock - Random hacking","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website"},"datePublished":"2010-07-02T13:43:51+00:00","dateModified":"2010-07-02T13:43:51+00:00","breadcrumb":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/07\/cachememcachedmock-instant-in-process-memcached-mock\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.streppone.it\/cosimo\/blog\/"},{"@type":"ListItem","position":2,"name":"Cache::Memcached::Mock, instant in-process memcached mock"}]},{"@type":"WebSite","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website","url":"https:\/\/www.streppone.it\/cosimo\/blog\/","name":"Random hacking","description":"Assume nothing. Code defensively. Keep it simple, stupid!","publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1","name":"cosimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","caption":"cosimo"},"logo":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/480"}],"collection":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/comments?post=480"}],"version-history":[{"count":0,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/480\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/media?parent=480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/categories?post=480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/tags?post=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}