Add script 'get-openssl-version.sh'.

This commit is contained in:
2023-06-21 11:09:08 +02:00
parent 0a7a61049a
commit 14056b44dd
5032 changed files with 340126 additions and 0 deletions

View File

@ -0,0 +1,66 @@
<?php
namespace dokuwiki\Cache;
/**
* Parser caching
*/
class CacheParser extends Cache
{
public $file = ''; // source file for cache
public $mode = ''; // input mode (represents the processing the input file will undergo)
public $page = '';
/**
*
* @param string $id page id
* @param string $file source file for cache
* @param string $mode input mode
*/
public function __construct($id, $file, $mode)
{
global $INPUT;
if ($id) {
$this->page = $id;
}
$this->file = $file;
$this->mode = $mode;
$this->setEvent('PARSER_CACHE_USE');
parent::__construct($file . $INPUT->server->str('HTTP_HOST') . $INPUT->server->str('SERVER_PORT'), '.' . $mode);
}
/**
* method contains cache use decision logic
*
* @return bool see useCache()
*/
public function makeDefaultCacheDecision()
{
if (!file_exists($this->file)) {
return false;
} // source exists?
return parent::makeDefaultCacheDecision();
}
protected function addDependencies()
{
// parser cache file dependencies ...
$files = array(
$this->file, // ... source
DOKU_INC . 'inc/Parsing/Parser.php', // ... parser
DOKU_INC . 'inc/parser/handler.php', // ... handler
);
$files = array_merge($files, getConfigFiles('main')); // ... wiki settings
$this->depends['files'] = !empty($this->depends['files']) ?
array_merge($files, $this->depends['files']) :
$files;
parent::addDependencies();
}
}