Warning: Use of undefined constant wp_cumulus_widget - assumed 'wp_cumulus_widget' (this will throw an Error in a future version of PHP) in /var/www/poil.dk/public_html/s/wp-content/plugins/wp-cumulus/wp-cumulus.php on line 375

Warning: session_start() [function.session-start]: Cannot start session when headers already sent in /var/www/poil.dk/public_html/s/wp-content/plugins/enhanced-wordpress-contactform/wp-contactform.php on line 276
Smart cache system for dokuwiki – Simon-Shlomo Poil

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 ‘smart’, because it automatically refreshes the user’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.

The first AJAX call checks if the page has been refreshed.

The second checks if the user is logged in.

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  AJAX cache checks takes about ~200 ms, and ~1.2 seconds. The timing naturally depends on server load and network performance.

Here is an example video of the plugin in action:

Smartcache plugin : http://www.dokuwiki.org/plugin:smartcache

Smart cache system for dokuwiki
Tagged on: