{"id":537,"date":"2011-09-01T01:08:20","date_gmt":"2011-09-01T00:08:20","guid":{"rendered":"http:\/\/www.poil.dk\/s\/?p=537"},"modified":"2012-03-28T15:13:37","modified_gmt":"2012-03-28T14:13:37","slug":"smart-cache-system-for-dokuwiki","status":"publish","type":"post","link":"https:\/\/www.poil.dk\/s\/smart-cache-system-for-dokuwiki\/537","title":{"rendered":"Smart cache system for dokuwiki"},"content":{"rendered":"<p>To support the speed the on the <a href=\"http:\/\/www.nbtwiki.net\" target=\"_blank\">NBTwiki<\/a>, I have developed the smart cache plugin for dokuwiki.<\/p>\n<p>The smart cache pluging enable better use of the browser cache for non-logged in users. The smart cache is &#8216;smart&#8217;, because it automatically refreshes the user&#8217;s browser cache if the wiki page has been updated. It also automatically refreshes if the user is logging in. All this is done using two every simple AJAX calls, and a client-side java script checking how fresh the cache is.<\/p>\n<p><script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"ca-pub-8640848843881724\";\n\/* testwiki3 *\/\ngoogle_ad_slot = \"6209104796\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n\/\/-->\n<\/script><br \/>\n<script type=\"text\/javascript\"\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/p>\n<p>The first AJAX call checks if the page has been refreshed.<\/p>\n<p>The second checks if the user is logged in.<\/p>\n<p>On my not very fast conncetion the smart cache plugin improved the second load time of the www.nbtwiki.net frontpage from ~ 6 seconds to ~2.6 seconds (using Firebug). The two\u00a0 AJAX cache checks takes about ~200 ms, and ~1.2 seconds. The timing naturally depends on server load and network performance.<\/p>\n<p>Here is an example video of the plugin in action:<br \/>\n<iframe loading=\"lazy\" width=\"750\" height=\"563\" src=\"https:\/\/www.youtube.com\/embed\/Ad2rO9vDoBk?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n<p>Smartcache plugin : <a href=\"http:\/\/www.dokuwiki.org\/plugin:smartcache\" target=\"_blank\">http:\/\/www.dokuwiki.org\/plugin:smartcache<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To support the speed the on the NBTwiki, I have developed the smart cache plugin for dokuwiki. The smart cache pluging enable better use of the browser cache for non-logged in users. The smart cache is &#8216;smart&#8217;, because it automatically<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[78,77],"class_list":["post-537","post","type-post","status-publish","format-standard","hentry","category-infobubble","tag-dokuwiki","tag-nbtwiki"],"_links":{"self":[{"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/posts\/537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/comments?post=537"}],"version-history":[{"count":9,"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/posts\/537\/revisions"}],"predecessor-version":[{"id":558,"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/posts\/537\/revisions\/558"}],"wp:attachment":[{"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/media?parent=537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/categories?post=537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poil.dk\/s\/wp-json\/wp\/v2\/tags?post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}