{"id":711,"date":"2007-03-14T01:00:00","date_gmt":"2007-03-13T16:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2007-03-14-1.html"},"modified":"2007-03-14T01:00:00","modified_gmt":"2007-03-13T16:00:00","slug":"2007-03-14-1","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2007-03-14-1.html","title":{"rendered":"XCache \u3092\u4f7f\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p>\n\u524d\u306e\u8a18\u4e8b\u306b\u66f8\u3044\u305f\u3001XCache \u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\u3002 <br \/>\n&nbsp;<br \/>\n\u4f8b1:\n<\/p>\n<blockquote><p>if(!xcache_isset(&#8220;time&#8221;)){<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;xcache_set(&#8220;time&#8221;, &#8220;\u73fe\u5728\u306e\u6642\u523b: &#8220;.date(&#8220;Y-m-d H:i:s&#8221;), 30); \/\/ 30 \u79d2\u9593\u30ad\u30e3\u30c3\u30b7\u30e5. \u6570\u5024\u3092\u7701\u7565\u3059\u308b\u3068\u3001\u304a\u305d\u3089\u304f php.ini \u306e\u8a2d\u5b9a\u4f9d\u5b58<br \/>\n}<br \/>\n&nbsp;<br \/>\necho xcache_get(&#8220;time&#8221;);\n<\/p><\/blockquote>\n<p>\u7d50\u679c\u4f8b:\n<\/p>\n<blockquote><p>\u73fe\u5728\u306e\u6642\u523b: 2007-03-14 11:30:56\n<\/p><\/blockquote>\n<p>30\u79d2\u672a\u6e80\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u305f\u3081\u5e38\u306b\u540c\u3058\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n30\u79d2\u4ee5\u4e0a\u7d4c\u904e\u5f8c\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u65b0\u305f\u306b\u73fe\u5728\u6642\u523b\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u8868\u793a\u3057\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n\u4f8b2:\n<\/p>\n<blockquote><p>echo &#8220;count: &#8221; . xcache_inc(&#8220;count&#8221;);\n<\/p><\/blockquote>\n<p>\u7d50\u679c:\n<\/p>\n<blockquote><p>count: 1\n<\/p><\/blockquote>\n<p>\u6570\u5024\u306f 1, 2, 3&#8230; \u3068\u3001\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5ea6\u306b\u5897\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n\u624b\u8efd\u306b\u6271\u3048\u3001\u7ba1\u7406\u30da\u30fc\u30b8\u3082\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u306a\u304b\u306a\u304b\u4fbf\u5229\u305d\u3046\u3067\u3059\u3002<br \/>\n&nbsp;<br \/>\n\u3061\u306a\u307f\u306b\u3001php.ini \u306e\u8a2d\u5b9a\u306f\u5927\u4f53\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3057\u305f(xcache.admin.user, xcahe.admin.pass \u306f\u8981\u5909\u66f4)\u3002\n<\/p>\n<blockquote><p>[xcache-common]<br \/>\nzend_extension = \/usr\/local\/lib\/php\/20060613\/xcache.so<br \/>\n; extension = xcache.so<br \/>\n; extension = php_xcache.dll<\/p>\n<p>[xcache.admin]<br \/>\nxcache.admin.user = &#8220;admin&#8221;<br \/>\nxcache.admin.pass = &#8220;fded9601747e160c1dac9b7eb0ce4af9&#8221; ; md5($your_password)<\/p>\n<p>[xcache]<br \/>\nxcache.shm_scheme =        &#8220;mmap&#8221;<br \/>\nxcache.size  =                4M<br \/>\n; set to cpu count (cat \/proc\/cpuinfo |grep -c processor)<br \/>\nxcache.count =                 1<br \/>\nxcache.slots =                8K<br \/>\nxcache.ttl   =                 600<br \/>\nxcache.var_ttl   =          600<br \/>\nxcache.var_maxttl   =          3600<br \/>\nxcache.var_size   =          4M<br \/>\n; interval of gc scanning expired items, 0=no scan, other values is in seconds<br \/>\nxcache.gc_interval =           300<br \/>\n&nbsp;<br \/>\nxcache.test =                Off<br \/>\nxcache.readonly_protection = Off<br \/>\nxcache.mmap_path =    &#8220;\/dev\/zero&#8221;<br \/>\n;xcache.mmap_path =    &#8220;\/tmp\/xcache&#8221;<br \/>\n&nbsp;<br \/>\nxcache.coredump_directory =   &#8220;&#8221;<br \/>\n&nbsp;<br \/>\n; per request settings<br \/>\nxcache.cacher =               On<br \/>\nxcache.stat   =               On<br \/>\nxcache.optimizer =           On<br \/>\n&nbsp;&nbsp;<br \/>\n[xcache.coverager]<br \/>\nxcache.coverager =          Off<br \/>\n&nbsp;<br \/>\ncache.coveragedump_directory = &#8220;&#8221;<br \/>\n;xcache.coveragedump_directory = &#8220;\/tmp\/pcov\/&#8221;\n<\/p><\/blockquote>\n<p>&nbsp;<br \/>\n\u53c2\u8003:<br \/>\n&#8211; <a href=\"http:\/\/trac.lighttpd.net\/xcache\/wiki\/XcacheApi\">XCache API<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u306e\u8a18\u4e8b\u306b\u66f8\u3044\u305f\u3001XCache \u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\u3002 &nbsp; \u4f8b1: if(!xcache_isset(&#8220;time&#8221;)){ &nbsp;&nbsp;&nbsp;&nbsp;xcache_set &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2007-03-14-1.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">XCache \u3092\u4f7f\u3063\u3066\u307f\u305f<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[32],"class_list":["post-711","post","type-post","status-publish","format-standard","hentry","tag-php"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=711"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}