{"id":1630,"date":"2014-06-26T00:32:05","date_gmt":"2014-06-25T15:32:05","guid":{"rendered":"http:\/\/blog.xcir.net\/?p=1630"},"modified":"2014-06-27T15:19:05","modified_gmt":"2014-06-27T06:19:05","slug":"varnishcache4-0-1%e3%81%8c%e5%85%ac%e9%96%8b%e3%81%95%e3%82%8c%e3%81%be%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"http:\/\/blog.xcir.net\/?p=1630","title":{"rendered":"VarnishCache4.0.1\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f"},"content":{"rendered":"<p>Varnish4.0.1\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u3064\u3044\u3067\u306b\u516c\u5f0f\u30b5\u30a4\u30c8\u3082\u30c7\u30b6\u30a4\u30f3\u304c\u65b0\u3057\u304f\u306a\u3063\u3066\u898b\u3084\u3059\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u81ea\u4f53\u306f\u4e3b\u306bBugfix\u3067\u30014.0.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u5831\u544a\u3055\u308c\u3066\u3044\u305f\u30d0\u30b0\u304c\u57fa\u672c\u7684\u306b\u4fee\u6b63\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5e7e\u3064\u304b\u91cd\u8981\u5ea6\u306e\u9ad8\u3044bugfix\u304c\u3042\u308b\u306e\u30674.0.0\u3092\u5165\u308c\u305f\u4eba\u306f\u9069\u7528\u3059\u308b\u306e\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<br \/>\n\uff08\u50d5\u304c\u5831\u544a\u3057\u3066\u305f\u30b9\u30ec\u30c3\u30c9\u304c\u958b\u653e\u3055\u308c\u306a\u3044\u306a\u3069\u306e\u30d0\u30b0\u3082\u4fee\u6b63\u3055\u308c\u3066\u307e\u3057\u305f\uff09<\/p>\n<p>\u307e\u305f\u3001\u4eca\u56de\u3082\u6a5f\u80fd\u5909\u66f4\u3068\u8ffd\u52a0\u304c\u304b\u306a\u308a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u52d5\u4f5c\u306b\u95a2\u308f\u308b\u3068\u3053\u308d\u3092\u306b\u3064\u3044\u3066\u629c\u7c8b\u3057\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/varnish\/Varnish-Cache\/blob\/master\/doc\/changes.rst#changes-from-400-to-401-2014-06-24\">\u516c\u5f0fChanges<\/a><br \/>\n<a href=\"https:\/\/www.varnish-cache.org\/content\/varnish-cache-401\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/p>\n<h2>\u6a5f\u80fd\u5909\u66f4<\/h2>\n<h3>Persistent storage\u304cdeprecated\u306b\u306a\u308a\u307e\u3057\u305f<\/h3>\n<p>ML\u898b\u3066\u305f\u3089<a href=\"http:\/\/www.gossamer-threads.com\/lists\/varnish\/misc\/31441\">\u4e0d\u7a4f\u306a\u52d5\u304d<\/a>\u304c\u51fa\u3066\u305f\u306e\u3067\u3069\u3046\u306a\u308b\u304b\u306a\u30fc\u3068\u304a\u3082\u3063\u3066\u305f\u3093\u3067\u3059\u304c\u3055\u3063\u304f\u308a\u5ec3\u6b62\u4e88\u5b9a\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n4.0.0\u306b\u306a\u3063\u3066\u591a\u5c11\u4f7f\u3044\u3084\u3059\u304f\u306a\u3063\u305f\u3068\u304a\u3082\u3063\u305f\u3093\u3067\u3059\u304c\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u7dad\u6301\u3057\u3064\u3064\u6574\u5408\u6027\u3092\u78ba\u4fdd\u3059\u308b\u306e\u304c\u304d\u3064\u304b\u3063\u305f\u307f\u305f\u3044\u3067\u3059\u3002<br \/>\n\u4eca\u5f8c\u5229\u7528\u3059\u308b\u969b\u306f-s deprecated_persistent\u3068\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u3084\u308a\u53d6\u308a\u3067\u306e\u60f3\u50cf\u3067\u3059\u304c\u6b21\u306e\u30ea\u30ea\u30fc\u30b9\u3067\u6d88\u3059\u3068\u3044\u3046\u3053\u3068\u306f\u306a\u3055\u305d\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\u3002<br \/>\n\u30b3\u30fc\u30c9\u4fee\u6b63\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u6bb5\u968e\u3067\u5207\u308a\u96e2\u3059\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3068<\/p>\n<hr \/>\n<h2>vmod_std\u6a5f\u80fd\u8ffd\u52a0<\/h2>\n<h3>\u30af\u30a8\u30ea\u30bd\u30fc\u30c8\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f(querysort)<\/h3>\n<p>vimeo\u306e<a href=\"https:\/\/github.com\/vimeo\/libvmod-boltsort\">boltsort<\/a>\u304c\u53d6\u308a\u8fbc\u307e\u308c\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; \">\n\r\nsub vcl_recv{\r\n  \/\/in:\/?a=1&amp;amp;c=3&amp;amp;b=2\r\n  \/\/  :\/?b=2&amp;amp;c=3&amp;amp;a=1\r\n  \/\/out:\/?a=1&amp;amp;b=2&amp;amp;c=3\r\n  set req.url = std.querysort(req.url);\r\n}\r\n\n<\/pre>\n<p>\u30af\u30a8\u30ea\u3092\u304a\u624b\u8efd\u306b\u6b63\u898f\u5316\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u30ad\u30e3\u30c3\u30b7\u30e5\u52b9\u7387\u304c\u3088\u304f\u306a\u308b\u3053\u3068\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4e00\u3064\u6ce8\u610f\u4e8b\u9805\u304c\u3042\u308b\u3068\u3059\u308c\u3070\u30ad\u30fc\u6570\u306f32\u306b\u5236\u9650\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3067\u3059\u3002<br \/>\n\u305f\u3060\u3001\u6700\u65b0\u30b3\u30fc\u30c9\u4e0a\u306f\u305d\u306e\u5236\u9650\u304c\u89e3\u9664\u3055\u308c\u3066\u304a\u308a\uff08\u3068\u3044\u3046\u304b\u30ea\u30ea\u30fc\u30b9\u65e5\u5f53\u65e5\u306b\u89e3\u9664\u3055\u308c\u3066\u308b\uff09<br \/>\n\u6b21\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u306f\u53d6\u308a\u8fbc\u307e\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n32\u4ee5\u4e0a\u306e\u30ad\u30fc\u6570\u3092\u6271\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u5834\u5408\u306f\u3068\u308a\u3042\u3048\u305a\u3053\u306e<a href=\"https:\/\/github.com\/varnish\/Varnish-Cache\/commit\/6547a456e793a4437f0004654c3fdf9ca09e3559\">Comit<\/a>\u3092\u9069\u7528\u3059\u308c\u3070\u3088\u3044\u3068\u601d\u3044\u307e\u3059<\/p>\n<h3>\u5909\u63db\u7cfb\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<\/h3>\n<h4>\u6587\u5b57\u5217->\u6d6e\u52d5\u5c0f\u6570(real)<\/h4>\n<pre class=\"brush: plain; \">\n\r\n\/\/std.real([\u6587\u5b57\u5217], [\u30d1\u30fc\u30b9\u5931\u6557\u6642\u306efallback\u5024])\r\n\/\/out:\r\n\/\/-   VCL_Log        12.990\r\n\/\/-   VCL_Log        0.000\r\nstd.log(&quot;&quot;+std.real(&quot;12.99&quot;,0.0));\r\nstd.log(&quot;&quot;+std.real(&quot;hoge&quot;,0.0));\r\n\r\n\n<\/pre>\n<h4>\u6d6e\u52d5\u5c0f\u6570->\u6642\u9593(real2time)<\/h4>\n<pre class=\"brush: plain; \">\n\r\n\/\/std.real2time([\u6d6e\u52d5\u5c0f\u6570])\r\n\/\/out:\r\n\/\/-   VCL_Log        Wed, 25 Jun 2014 15:26:40 GMT\r\n\/\/-   VCL_Log        Wed, 25 Jun 2014 15:26:40 GMT\r\nstd.log(&quot;&quot;+std.real2time(1403707478));\r\nstd.log(&quot;&quot;+std.real2time(1403707478.999));\r\n\n<\/pre>\n<p>\u203b\u82e5\u5e72\u4f8b\u304c\u60aa\u3044\u304b\u3082<\/p>\n<h4>\u6642\u9593->\u6574\u6570(time2integer)<\/h4>\n<pre class=\"brush: plain; \">\n\r\n\/\/std.time2integer([\u6642\u9593])\r\n\/\/out:\r\n\/\/-   VCL_Log        1403707709\r\n\/\/-   VCL_Log        1403707769\r\nstd.log(&quot;&quot;+std.time2integer(now));\r\nstd.log(&quot;&quot;+std.time2integer(now + 1m));\r\n\n<\/pre>\n<h4>\u6642\u9593->\u6d6e\u52d5\u5c0f\u6570(time2real)<\/h4>\n<pre class=\"brush: plain; \">\n\r\n\/\/std.time2real([\u6642\u9593])\r\n\/\/out:\r\n\/\/-   VCL_Log        1403707750.479\r\n\/\/-   VCL_Log        1403707750.489\r\nstd.log(&quot;&quot;+std.time2real(now));\r\nstd.log(&quot;&quot;+std.time2real(now + 10ms));\r\n\n<\/pre>\n<hr \/>\n<h2>VCL\u5909\u66f4<\/h2>\n<h3>\u65e5\u4ed8\u306e\u6307\u5b9a\u306b\u5e74(y)\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/h3>\n<p>365d = 1y\u3067\u3059<\/p>\n<hr \/>\n<h2>\u305d\u306e\u4ed6\u5909\u66f4<\/h2>\n<h3>varnishncsa\u306e%D\u304c\u6574\u6570\u306b\u5207\u308a\u6368\u3066\u3089\u308c\u307e\u3059<\/h3>\n<p>\u30de\u30a4\u30af\u30ed\u79d2\u5358\u4f4d\u306a\u306e\u3067\u7279\u306b\u5f71\u97ff\u306a\u3044\u3068\u601d\u3044\u307e\u3059<\/p>\n<h3>varnishncsa\u3067\u65b0\u3057\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<\/h3>\n<p>%I(\u5168\u53d7\u4fe1\u30d0\u30a4\u30c8\u6570)\u3068%O(\u5168\u9001\u4fe1\u30d0\u30a4\u30c8\u6570)\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u500b\u4eba\u7684\u306b\u7d50\u69cb\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n<h3>pass\u304ctransfer-encoding: chunked\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f<\/h3>\n<p>\u4eca\u307e\u3067return(pipe)\u3058\u3083\u306a\u3044\u3068\u30c0\u30e1\u3067\u3057\u305f(builtin.vcl\u3067pipe\u3057\u3066\u305f)<\/p>\n<hr \/>\n<p>\u3042\u3068\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304b\u3051\u305f\u6642\u306bVarnish\u306erestart\u8d70\u308a\u307e\u3059\u3002\uff08\u524d\u307e\u3067\u7121\u304b\u3063\u305f\u3088\u3046\u306a\u6c17\u304c\u30fb\u30fb\u30fb\uff09<br \/>\n\u4ee5\u4e0b\u306e\u7d44\u307f\u5408\u308f\u305b\u306e\u5834\u5408\u306f\u5373\u6b7b\u3057\u307e\u3059\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044<br \/>\n\u3000\u30fbpersistent\u3092\u5229\u7528\u3057\u3066\u3044\u308b<br \/>\n\u3000\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u81ea\u52d5\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b<br \/>\n\u3053\u306e\u30b1\u30fc\u30b9\u306e\u5834\u5408\u4ee5\u4e0b\u306e\u30b3\u30f3\u30dc\u304c\u6210\u7acb\u3057\u307e\u3059<br \/>\n\u30001) \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u81ea\u52d5\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u304b\u304b\u308b<br \/>\n\u30002) 4.0.1\u3067restart\u304c\u304b\u304b\u308b<br \/>\n\u30003) persistent\u306e\u540d\u524d\u3092\u7f6e\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u8d77\u52d5\u3057\u306a\u3044<br \/>\n\u30004) <strong>( \u02d8\u03c9\u02d8)<\/strong><\/p>\n<p>\u307e\u305f\u3001\u307e\u3060\u544a\u77e5\u306f\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304c<a href=\"https:\/\/github.com\/varnish\/Varnish-Cache\/commit\/4d1647681aa47b232717004dd2d4c61c00f4071c\">3.0.6RC1<\/a>\u304c\u4e0a\u304c\u3063\u3066\u3044\u308b\u306e\u3067\u8fd1\u3044\u3046\u3061\u306b3\u7cfb\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3082\u6765\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u3002<br \/>\n\u3042\u3068\u9031\u672b\u306b\u3067\u3082\u5225\u8a18\u4e8b\u30674.1\u3068\u3044\u3063\u305f\u4eca\u5f8c\u306e\u30ea\u30ea\u30fc\u30b9\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066\u66f8\u304d\u307e\u3059\uff01<\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_hatena\"><a href='\/\/b.hatena.ne.jp\/add?mode=confirm&url=http%3A%2F%2Fblog.xcir.net%2F%3Fp%3D1630&title=VarnishCache4.0.1%E3%81%8C%E5%85%AC%E9%96%8B%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/hatena.gif' alt='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' width='16' height='12' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_hatena_users\"><a href='\/\/b.hatena.ne.jp\/entry\/http:\/\/blog.xcir.net\/?p=1630' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - VarnishCache4.0.1\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='\/\/b.hatena.ne.jp\/entry\/image\/http:\/\/blog.xcir.net\/?p=1630' alt='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - VarnishCache4.0.1\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - VarnishCache4.0.1\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f'   class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=http%3A%2F%2Fblog.xcir.net%2F%3Fp%3D1630&t=VarnishCache4.0.1%E3%81%8C%E5%85%AC%E9%96%8B%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/facebook.png' alt='Facebook \u306b\u30b7\u30a7\u30a2' title='Facebook \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_linkedin\"><a href='\/\/www.linkedin.com\/shareArticle?mini=true&url=http%3A%2F%2Fblog.xcir.net%2F%3Fp%3D1630&title=VarnishCache4.0.1%E3%81%8C%E5%85%AC%E9%96%8B%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F' title='LinkedIn \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/linkedin.png' alt='LinkedIn \u306b\u30b7\u30a7\u30a2' title='LinkedIn \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"http:\/\/blog.xcir.net\/?p=1630\" data-text=\"VarnishCache4.0.1\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>Varnish4.0.1\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f\u3002 \u3064\u3044\u3067\u306b\u516c\u5f0f\u30b5\u30a4\u30c8\u3082\u30c7\u30b6\u30a4\u30f3\u304c\u65b0\u3057\u304f\u306a\u3063\u3066\u898b\u3084\u3059\u304f\u306a\u308a\u307e\u3057\u305f\u3002 \u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u81ea\u4f53\u306f\u4e3b\u306bBugfix\u3067\u30014.0.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u5831\u544a\u3055\u308c\u3066\u3044\u305f\u30d0\u30b0\u304c\u57fa\u672c\u7684\u306b\u4fee\u6b63\u3055\u308c\u3066\u3044\u307e\u3059 <a href='http:\/\/blog.xcir.net\/?p=1630' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[5,32],"class_list":["post-1630","post","type-post","status-publish","format-standard","hentry","category-3","tag-varnish","tag-32","category-3-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1630"}],"version-history":[{"count":19,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions"}],"predecessor-version":[{"id":1649,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions\/1649"}],"wp:attachment":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1630"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}