Page MenuHomePhabricator

cache.php
No OneTemporary

cache.php

<?php
/**
* DokuWiki DAVCal PlugIn - Ajax component
*/
if(!defined('DOKU_INC')) die();
class action_plugin_davcard_cache extends DokuWiki_Action_Plugin {
function __construct() {
}
function register(Doku_Event_Handler $controller) {
$controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, 'handle_parser_cache_use');
}
function handle_parser_cache_use(Doku_Event $event, $param)
{
$cache = &$event->data;
if(!isset($cache->page)) return;
//purge only xhtml cache
if($cache->mode != "xhtml") return;
$meta = p_get_metadata($cache->page, 'plugin_davcard');
if($meta === null)
return;
// Force re-caching if the webdavclient has synced
if(isset($meta['webdavclient']))
{
$wdc =& plugin_load('helper', 'webdavclient');
if(is_null($wdc))
return;
foreach($meta['webdavclient'] as $connectionId)
{
$cache->depends['files'][] = $wdc->getLastSyncChangeFileForConnection($connectionId);
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Jan 23, 6:33 PM (23 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
925686
Default Alt Text
cache.php (1 KB)

Event Timeline