1<?php 2 3if(!defined('DOKU_INC')) die(); 4 5class action_plugin_abbrlist extends DokuWiki_Action_Plugin { 6 7 // Register our hooks 8 function register(Doku_Event_Handler $controller) { 9 $controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, 'handle_parser_cache_use'); 10 } 11 12 function handle_parser_cache_use(&$event, $param) 13 { 14 global $ID; 15 $cache = &$event->data; 16 if(!isset($cache->page)) return; 17 //purge only xhtml cache 18 if($cache->mode != "xhtml") return; 19 20 $abbrMeta = p_get_metadata($ID, 'abbrlist'); 21 if(!$abbrMeta) 22 return; 23 24 $cache->depends['files'][] = DOKU_INC + 'conf/acronyms.conf'; 25 $cache->depends['files'][] = DOKU_INC + 'conf/acronyms.local.conf'; 26 27 } 28 29}