{"id":85,"date":"2010-02-17T01:41:02","date_gmt":"2010-02-16T16:41:02","guid":{"rendered":"http:\/\/blog.xcir.net\/?p=85"},"modified":"2010-05-16T23:24:57","modified_gmt":"2010-05-16T14:24:57","slug":"varnish%e3%81%aevcl%e3%81%ae%e5%88%86%e5%89%b2%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/blog.xcir.net\/?p=85","title":{"rendered":"Varnish\u306eVCL\u306e\u5206\u5272\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u8efd\u3081\u306e\u30cd\u30bf\u3067<br \/>\nvarnish\u3067VCL\uff08\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u4f5c\u3063\u3066\u3044\u308b\u3068\u3059\u3054\u304f\u5206\u5272\u3057\u305f\u304f\u306a\u308a\u307e\u3059<br \/>\n\u305f\u3068\u3048\u3070ACL\uff08\u30a2\u30af\u30bb\u30b9\u5236\u9650\u307e\u308f\u308a\uff09\u306a\u3069\u306e\u5b9a\u7fa9\u3092\u66f8\u3044\u3066\u307f\u308b\u3068\u975e\u5e38\u306b\u5197\u9577\u306b\u306a\u3063\u305f\u308a\u3057\u3066\u56f0\u308a\u307e\u3059<br \/>\n\u306a\u3093\u304b\u5206\u5272\u65b9\u6cd5\u306a\u3044\u304b\u306a\u30fc\u3068\u63a2\u3057\u3066\u305f\u3089\u3042\u308a\u307e\u3057\u305f<\/p>\n<pre class=\"brush: plain; \">\n\r\ninclude &quot;\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u540d&quot;;\r\n\n<\/pre>\n<p>\u3048\u3048\u305d\u306e\u307e\u3093\u307e\u3067\u3059<br \/>\n\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u3082\u4e00\u5fdc\u66f8\u3044\u3066\u306f\u3042\u308b\u306e\u3067\u3059\u304c<\/p>\n<blockquote><p>Syntax overview<\/p>\n<p>The VCL syntax is very simple, and deliberately similar to C and Perl. Blocks are delimited by curly braces,statements end with semicolons, and comments may be written as in C, C++ or Perl according to your own preferences.<\/p>\n<p>In addition to the C-like assignment (=), comparison (==) and boolean (!, &amp;&amp; and ||) operators, VCL supports regular expression and ACL matching using the ~ operator.<br \/>\nUnlike C and Perl, the backslash (\\) character has no special meaning in strings in VCL, which use the (%xx) escape mechanism just like URLs, so it can be freely used in regular expressions without doubling.<br \/>\nAssignments are introduced with the set keyword. There are no user-defined variables; values can only be assigned to variables attached to backend, request or document objects. Most of these are typed, and the values assigned to them must have a compatible unit suffix.<br \/>\nVCL has if tests, but no loops.<br \/>\n<strong> The contents of another VCL file may be inserted at any point in the code by using the include keyword followed by the name of the other file as a quoted string.<\/strong><\/p><\/blockquote>\n<p><a target=\"_blank\" href=\"http:\/\/varnish-cache.org\/wiki\/VCL\">VCL &#8211; Varnish configuation Language<\/a><br \/>\n\u3068\u3042\u3063\u3066\u66f8\u3044\u3066\u308b\u306e\u3067\u3059\u304c\u975e\u82f1\u8a9e\u570f\u3060\u3068\u3055\u304f\u3063\u3068\u8aad\u307f\u98db\u3070\u3057\u305d\u3046\u3067\u3059\uff1e\uff1c<br \/>\n\u3053\u3046\u3044\u3046\u6240\u3082\u53c2\u8003\u8a18\u8ff0\u304c\u3042\u308b\u3068\u52a9\u304b\u308b\u3093\u3067\u3059\u304c\u306d\u30fb\u30fb\u30fb<br \/>\n\u81ea\u5206\u3082\u8aad\u307f\u98db\u3070\u3057\u305f\u53e3\u306a\u306e\u3067\u81ea\u6212\u3082\u8fbc\u3081\u3066\u5171\u6709\u3067\u3059<\/p>\n<p>\u53c2\u8003\u30b5\u30a4\u30c8<br \/>\n<a target=\"_blank\" href=\"http:\/\/phk.freebsd.dk\/pubs\/\">Poul-Hennings other homepage<\/a><\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_hatena\"><a href='\/\/b.hatena.ne.jp\/add?mode=confirm&url=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D85&title=Varnish%E3%81%AEVCL%E3%81%AE%E5%88%86%E5%89%B2%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6' 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='https:\/\/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\/https:\/\/blog.xcir.net\/?p=85' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish\u306eVCL\u306e\u5206\u5272\u306b\u3064\u3044\u3066' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='\/\/b.hatena.ne.jp\/entry\/image\/https:\/\/blog.xcir.net\/?p=85' alt='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish\u306eVCL\u306e\u5206\u5272\u306b\u3064\u3044\u3066' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish\u306eVCL\u306e\u5206\u5272\u306b\u3064\u3044\u3066'   class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D85&t=Varnish%E3%81%AEVCL%E3%81%AE%E5%88%86%E5%89%B2%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/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=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D85&title=Varnish%E3%81%AEVCL%E3%81%AE%E5%88%86%E5%89%B2%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6' title='LinkedIn \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/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=\"https:\/\/blog.xcir.net\/?p=85\" data-text=\"Varnish\u306eVCL\u306e\u5206\u5272\u306b\u3064\u3044\u3066\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u8efd\u3081\u306e\u30cd\u30bf\u3067 varnish\u3067VCL\uff08\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u4f5c\u3063\u3066\u3044\u308b\u3068\u3059\u3054\u304f\u5206\u5272\u3057\u305f\u304f\u306a\u308a\u307e\u3059 \u305f\u3068\u3048\u3070ACL\uff08\u30a2\u30af\u30bb\u30b9\u5236\u9650\u307e\u308f\u308a\uff09\u306a\u3069\u306e\u5b9a\u7fa9\u3092\u66f8\u3044\u3066\u307f\u308b\u3068\u975e\u5e38\u306b\u5197\u9577\u306b\u306a\u3063\u305f\u308a\u3057\u3066\u56f0\u308a\u307e\u3059 \u306a\u3093\u304b\u5206\u5272\u65b9\u6cd5\u306a\u3044\u304b\u306a\u30fc\u3068\u63a2\u3057\u3066\u305f <a href='https:\/\/blog.xcir.net\/?p=85' 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,13],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-3","tag-varnish","tag-varnish2-0-6","category-3-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85"}],"version-history":[{"count":6,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":145,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/85\/revisions\/145"}],"wp:attachment":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}