{"id":645,"date":"2008-08-24T16:27:09","date_gmt":"2008-08-24T07:27:09","guid":{"rendered":"https:\/\/wp-78qb7hnp.pistolfly.jp\/weblog\/2008\/08\/railsmemcached-1.html"},"modified":"2008-08-24T16:27:09","modified_gmt":"2008-08-24T07:27:09","slug":"railsmemcached-1","status":"publish","type":"post","link":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html","title":{"rendered":"Rails\u3067memcached\u3092\u4f7f\u3046"},"content":{"rendered":"<p>mac osx\u306bmemcached\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre class=\"command-line\">$ sudo port install memcached\nPassword:\n--->  Fetching libevent\n--->  Attempting to fetch libevent-1.4.3-stable.tar.gz from http:\/\/monkey.org\/~provos\/\n--->  Verifying checksum(s) for libevent\n--->  Extracting libevent\n--->  Configuring libevent\n--->  Building libevent with target all\n--->  Staging libevent into destroot\n--->  Installing libevent 1.4.3_0\n--->  Activating libevent 1.4.3_0\n--->  Cleaning libevent\n--->  Fetching memcached\n--->  Attempting to fetch memcached-1.2.5.tar.gz from http:\/\/www.danga.com\/memcached\/dist\/\n--->  Verifying checksum(s) for memcached\n--->  Extracting memcached\n--->  Configuring memcached\n--->  Building memcached with target all\n--->  Staging memcached into destroot\n--->  Creating launchd control script\n###########################################################\n# A startup item has been generated that will aid in\n# starting memcached with launchd. It is disabled\n# by default. Execute the following command to start it,\n# and to cause it to launch at startup:\n#\n# sudo launchctl load -w \/Library\/LaunchDaemons\/org.macports.memcached.plist\n###########################################################\n--->  Installing memcached 1.2.5_2\n--->  Activating memcached 1.2.5_2\n--->  Cleaning memcached\n<\/pre>\n<p>memcached\u306e\u81ea\u52d5\u8d77\u52d5\u3092\u8a2d\u5b9a\u3002<\/p>\n<pre class=\"command-line\">$ sudo launchctl load -w \/Library\/LaunchDaemons\/org.macports.memcached.plist\n<\/pre>\n<p>cached_model\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002(memcache-client\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002)<\/p>\n<pre class=\"command-line\">$ sudo gem install cached_model\n<\/pre>\n<p>config\/environment.rb<\/p>\n<pre class=\"prettyprint\">require 'memcache'\nmemcache_options = {\n  :c_threshold => 10_000,\n  :compression => true,\n  :debug => false,\n  :namespace => \":app-#{RAILS_ENV}\",\n  :readonly => false,\n  :urlencode => false\n}\nCACHE = MemCache.new memcache_options\nCACHE.servers = 'localhost:11211'\nActionController::Base.session_options[:expires] = 1800\nActionController::Base.session_options[:cache] = CACHE\n<\/pre>\n<p>\u53c2\u8003:<br \/>\n<a href=\"http:\/\/nubyonrails.com\/articles\/memcached-basics-for-rails\">memcached Basics for Rails | Ruby on Rails for Newbies<\/a><br \/>\n<a href=\"http:\/\/www.danga.com\/memcached\/\">memcached: a distributed memory object caching system<\/a><br \/>\nmemcached\u516c\u5f0f\u30b5\u30a4\u30c8<br \/>\n<a href=\"http:\/\/www.ajohnstone.com\/archives\/installing-memcached\/\">Installing memcached | Development, Analysis And Research<\/a><br \/>\nmemcahced\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<br \/>\n<a href=\"http:\/\/skwpspace.com\/2006\/08\/19\/rails-fragment-cache-with-memcached-client-and-time-based-expire-option\/\">Rails fragment cache with memcached-client and time-based :expire option - skwpspace<\/a><br \/>\nrails\u306efragment cache\u3067memcached\u3092\u4f7f\u3046\u305f\u3081\u306e\u30d7\u30e9\u30b0\u30a4\u30f3<br \/>\n<a href=\"http:\/\/d.hatena.ne.jp\/dreammind\/20070827\">rails\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u7ba1\u7406\u3067memcached\u3092\u5229\u7528 - dreammind\u306e\u65e5\u8a18<\/a><br \/>\n<a href=\"http:\/\/tech.feedforce.jp\/memcached.html\">FFTT : memcached<\/a><br \/>\n<a href=\"http:\/\/l-w-i.net\/t\/memcached\/0install_001.txt\">[memcached] memcached\u5c0e\u5165\u624b\u9806 - Life with IT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>mac osx\u306bmemcached\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002 $ sudo port install memcached Password: ---> Fetching libevent ---> Attempting to fe &hellip; <a href=\"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Rails\u3067memcached\u3092\u4f7f\u3046<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[31],"tags":[],"class_list":["post-645","post","type-post","status-publish","format-standard","hentry","category-ruby-on-rails","ja"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rails\u3067memcached\u3092\u4f7f\u3046 - Pistolfly<\/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.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rails\u3067memcached\u3092\u4f7f\u3046 - Pistolfly\" \/>\n<meta property=\"og:description\" content=\"mac osx\u306bmemcached\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002 $ sudo port install memcached Password: ---&gt; Fetching libevent ---&gt; Attempting to fe &hellip; \u7d9a\u304d\u3092\u8aad\u3080 Rails\u3067memcached\u3092\u4f7f\u3046 &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html\" \/>\n<meta property=\"og:site_name\" content=\"Pistolfly\" \/>\n<meta property=\"article:published_time\" content=\"2008-08-24T07:27:09+00:00\" \/>\n<meta name=\"author\" content=\"Pistolfly\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pistolfly\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html\"},\"author\":{\"name\":\"Pistolfly\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"headline\":\"Rails\u3067memcached\u3092\u4f7f\u3046\",\"datePublished\":\"2008-08-24T07:27:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html\"},\"wordCount\":63,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"articleSection\":[\"Ruby on Rails\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html\",\"name\":\"Rails\u3067memcached\u3092\u4f7f\u3046 - Pistolfly\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\"},\"datePublished\":\"2008-08-24T07:27:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2008\\\/08\\\/railsmemcached-1.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rails\u3067memcached\u3092\u4f7f\u3046\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/\",\"name\":\"Pistolfly\",\"description\":\"Developer Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\",\"name\":\"Pistolfly\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"caption\":\"Pistolfly\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\"},\"description\":\"Software Engineer in Tokyo, Japan\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/author\\\/pistolfly\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rails\u3067memcached\u3092\u4f7f\u3046 - Pistolfly","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.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html","og_locale":"ja_JP","og_type":"article","og_title":"Rails\u3067memcached\u3092\u4f7f\u3046 - Pistolfly","og_description":"mac osx\u306bmemcached\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002 $ sudo port install memcached Password: ---> Fetching libevent ---> Attempting to fe &hellip; \u7d9a\u304d\u3092\u8aad\u3080 Rails\u3067memcached\u3092\u4f7f\u3046 &rarr;","og_url":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html","og_site_name":"Pistolfly","article_published_time":"2008-08-24T07:27:09+00:00","author":"Pistolfly","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"Pistolfly","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html#article","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html"},"author":{"name":"Pistolfly","@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"headline":"Rails\u3067memcached\u3092\u4f7f\u3046","datePublished":"2008-08-24T07:27:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html"},"wordCount":63,"commentCount":0,"publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"articleSection":["Ruby on Rails"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html","url":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html","name":"Rails\u3067memcached\u3092\u4f7f\u3046 - Pistolfly","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#website"},"datePublished":"2008-08-24T07:27:09+00:00","breadcrumb":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pistolfly.com\/weblog\/2008\/08\/railsmemcached-1.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.pistolfly.com\/weblog"},{"@type":"ListItem","position":2,"name":"Rails\u3067memcached\u3092\u4f7f\u3046"}]},{"@type":"WebSite","@id":"https:\/\/www.pistolfly.com\/weblog\/#website","url":"https:\/\/www.pistolfly.com\/weblog\/","name":"Pistolfly","description":"Developer Blog","publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pistolfly.com\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab","name":"Pistolfly","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","caption":"Pistolfly"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g"},"description":"Software Engineer in Tokyo, Japan","url":"https:\/\/www.pistolfly.com\/weblog\/author\/pistolfly"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paorzz-ap","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/comments?post=645"}],"version-history":[{"count":0,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/645\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/media?parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/categories?post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/tags?post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}