{"id":9,"date":"2009-08-20T15:04:01","date_gmt":"2009-08-20T06:04:01","guid":{"rendered":"https:\/\/memo.cute.bz\/cakephp\/?p=9"},"modified":"2009-08-20T15:05:26","modified_gmt":"2009-08-20T06:05:26","slug":"%e3%82%ad%e3%83%a3%e3%83%83%e3%82%b7%e3%83%a5","status":"publish","type":"post","link":"https:\/\/memo.cute.bz\/cakephp\/?p=9","title":{"rendered":"\u30ad\u30e3\u30c3\u30b7\u30e5"},"content":{"rendered":"<p>\u30ad\u30e3\u30c3\u30b7\u30e5\u30d8\u30eb\u30d1\u30fc\u3092\u5229\u7528\u3057\u3066\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u3084\u30d3\u30e5\u30fc\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3002<br \/>\n\u30d3\u30e5\u30fc\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3053\u3068\u3067\u8ca0\u8377\u3092\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n\u203b\u4ee5\u4e0b\u3001Cache.config \u306f default \u306e\u307e\u307e\u3068\u3059\u308b\u3002\uff08\u30ad\u30e3\u30c3\u30b7\u30e5\u30a8\u30f3\u30b8\u30f3\u306f File\uff09<\/p>\n<p><!--more--><\/p>\n<h3>core.php \u306e\u8a2d\u5b9a<\/h3>\n<p>core.php \u3067 Cache \u3092\u6709\u52b9\u306b\u3059\u308b\u3002\u8a2d\u5b9a\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3002<br \/>\n\u203b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30b3\u30e1\u30f3\u30c8\u3092\u306f\u305a\u3059\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nConfigure::write('Cache.disable', false); \/\/ true \u3092 false \u306b\u4fee\u6b63\r\nConfigure::write('Cache.check', true);\r\n<\/pre>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8a2d\u5b9a<\/h3>\n<p>CacheHelper \u3092\u8aad\u307f\u8fbc\u3080\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nvar $helpers = array('Cache');\r\n<\/pre>\n<p>\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u6307\u5b9a\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nvar $cacheAction = array(\r\n\t'view\/23\/' =&gt; 21600,\r\n\t'view\/48\/' =&gt; 36000,\r\n\t'view\/52\/'  =&gt; 48000\r\n);\r\n<\/pre>\n<p>\u6307\u5b9a\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u5168\u3066\u3001\u307e\u305f\u306f\u3001\u5168\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u5834\u5408\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nvar $cacheAction = array(\r\n\t'archives\/' =&gt; '60000'\r\n);\r\n<\/pre>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nvar $cacheAction = &quot;1 hour&quot;;\r\n<\/pre>\n<p>\u7279\u5b9a\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u306a\u3044\u5834\u5408\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\naction() {\r\n    \/\/ \u30a2\u30af\u30b7\u30e7\u30f3\u5185\u3067 cacheAction \u3092 false \u306b\u3059\u308b\u3002\r\n    $this-&gt;cacheAction = false;\r\n    \/* \u4ee5\u4e0b\u7565 *\/\r\n}\r\n<\/pre>\n<h3>\u30d3\u30e5\u30fc\u306e\u8a2d\u5b9a<\/h3>\n<p>\u7279\u5b9a\u7b87\u6240\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u3001&lt;cake:nocache&gt; \u30bf\u30b0\u3067\u56f2\u3080\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;cake:nocache&gt;\r\n\/* \u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u305f\u304f\u306a\u3044\u51e6\u7406\u3092\u8a18\u8ff0\u3059\u308b *\/\r\n&lt;\/cake:nocache&gt;\r\n<\/pre>\n<h3>\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u624b\u52d5\u30af\u30ea\u30a2<\/h3>\n<p>\u624b\u52d5\u3067\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30af\u30ea\u30a2\u3092\u884c\u3046\u5834\u5408\u306f\u3001 clearCache \u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction clearCache($params = null, $type = 'views', $ext = '.php')\r\n<\/pre>\n<h3>\u6ce8\u610f\u70b9<\/h3>\n<h4>\u30d3\u30e5\u30fc\u30d5\u30a1\u30a4\u30eb\u3067\u306e $cache \u306f NG<\/h4>\n<p>\u30d3\u30e5\u30fc\u30d5\u30a1\u30a4\u30eb\uff08example.ctp \u306e\u30d5\u30a1\u30a4\u30eb\uff09\u3067\u306f\u3001$cache \u3068\u3044\u3046\u5909\u6570\u3092\u4f7f\u3063\u3066\u306f\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001View \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e loaded[&#8216;cache&#8217;] \u306e\u5024\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u539f\u56e0\u3002<\/p>\n<p>.ctp \u30d5\u30a1\u30a4\u30eb\u5185\u3067\u306f\u3001HtmlHelper \u3084 FormHelper \u3092\u4f7f\u3046\u3068\u304d\u306b $html-> \u3084 $form-> \u3068\u3044\u3063\u305f\u4f7f\u3044\u65b9\u3092\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u3001$cache \u306b\u3082 CacheHelper \u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u5225\u306e\u5024\u3092\u4ee3\u5165\u3059\u308b\u3068\u6b63\u5e38\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u304d\u306a\u304f\u306a\u308b\u3002<\/p>\n<h4>\u81ea\u52d5\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u306b\u3064\u3044\u3066<\/h4>\n<p>\u901a\u5e38\u3001\u30e2\u30c7\u30eb\u304c\u66f4\u65b0\u3055\u308c\u305f\u5834\u5408 (Insert, update, delete) \u306f\u95a2\u9023\u3059\u308b\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u30af\u30ea\u30a2\u3055\u308c\u308b\u304c\u3001\u81ea\u52d5\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u304c\u52b9\u304f\u306e\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u540d\u3068\u30e2\u30c7\u30eb\u540d\u304c\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3066\u3044\u308b\u5834\u5408\u306e\u540c\u540d\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306b\u3088\u3063\u3066\u5909\u66f4\u3092\u884c\u3063\u305f\u5834\u5408\u306b\u9650\u3089\u308c\u3066\u3044\u308b\u3002<\/p>\n<h3>\u53c2\u8003<\/h3>\n<p><a href=\"http:\/\/book.cakephp.org\/ja\/view\/213\/Cache\" class=\"note\">\u30ad\u30e3\u30c3\u30b7\u30e5 :: \u4e3b\u8981\u306a\u30d8\u30eb\u30d1\u30fc :: \u30de\u30cb\u30e5\u30a2\u30eb :: 1.2 Collection :: The Cookbook<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ad\u30e3\u30c3\u30b7\u30e5\u30d8\u30eb\u30d1\u30fc\u3092\u5229\u7528\u3057\u3066\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u3084\u30d3\u30e5\u30fc\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3002 \u30d3\u30e5\u30fc\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3053\u3068\u3067\u8ca0\u8377\u3092\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002 \u203b\u4ee5\u4e0b\u3001Cache.config \u306f default \u306e\u307e\u307e\u3068\u3059\u308b\u3002\uff08\u30ad\u30e3\u30c3\u30b7\u30e5\u30a8\u30f3\u30b8\u30f3\u306f Fi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-6"],"_links":{"self":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":0,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}