History log of /dokuwiki/inc/Cache/CacheParser.php (Results 1 – 15 of 15)
Revision Date Author Comments
# 10287e99 25-Jun-2026 Andreas Gohr <andi@splitbrain.org>

Cache: key on resolved base URL instead of the raw Host header

The instruction (.i), render (.xhtml) and metadata cache keys embedded
the client-supplied HTTP_HOST and SERVER_PORT, as did the JS and

Cache: key on resolved base URL instead of the raw Host header

The instruction (.i), render (.xhtml) and metadata cache keys embedded
the client-supplied HTTP_HOST and SERVER_PORT, as did the JS and CSS
dispatchers. A crawler varying the Host header - or a wiki reachable
under several names - thus multiplied every cached artifact per host
value, growing the cache directory without bound.

Instructions and metadata never embed resolved URLs, so they drop the
host component entirely. Rendered output and the JS/CSS bundles key
on DOKU_BASE (plus the SSL flag for JS) instead: fixed when baseurl is
configured, and only varying for genuine multi-domain canonical setups.
Feeds keep host/port keying since their links are always absolute.

This should address the obvious cases mentioned in #4574

show more ...


# 16999ed1 04-Jun-2026 Andreas Gohr <gohr@cosmocode.de>

parserutils: allow callers to override the parse syntax, key cache on it

With the registry now carrying the flavour as a parameter, expose that
to callers: p_get_instructions(), p_cached_instruction

parserutils: allow callers to override the parse syntax, key cache on it

With the registry now carrying the flavour as a parameter, expose that
to callers: p_get_instructions(), p_cached_instructions() and
p_cached_output() gain an optional $syntax argument. null (the default)
means "use the configured $conf['syntax']", preserving behaviour for
every existing call site; an explicit flavour parses under it regardless
of the wiki's configured preference.

This is what lets bundled assets render deterministically — e.g. a
plugin forcing 'dw' on a document whose configured syntax is 'md'.

Because that case renders the same file under two flavours within one
request, key both the in-request memo (the $run map) and the on-disk
cache on $syntax so the two do not collide. The syntax enters the cache
key only when passed explicitly (non-null); when null the key is
unchanged, so existing caches are untouched. Plumbed through new
optional $syntax args on CacheParser / CacheInstructions, appended to
the key string.

show more ...


# 71096e46 18-Apr-2026 Andreas Gohr <andi@splitbrain.org>

move handler methods into ParserMode classes and rename Handler

Each ParserMode class now implements handle() from ModeInterface,
containing the token handling logic that previously lived as individ

move handler methods into ParserMode classes and rename Handler

Each ParserMode class now implements handle() from ModeInterface,
containing the token handling logic that previously lived as individual
methods on Doku_Handler.

The Handler class (formerly Doku_Handler) is the single dispatch point:
Lexer passes tokens to Handler::handleToken() which routes to mode
objects, plugins, or returns false. The Lexer only tokenizes and
resolves mapHandler aliases.

Key changes:
- Add handle() to ModeInterface, implemented by all mode classes
- Move Doku_Handler to dokuwiki\Parsing\Handler namespace
- File extends Code (shared parsing via $type property)
- Quotes uses mapHandler() + Handler::getModeName() for sub-modes
- Media::parseMedia() replaces Doku_Handler_Parse_Media()
- Code::parseHighlightOptions() replaces parse_highlight_options()
- Per-parse state (footnote, doublequote) stays on Handler
- Deprecated wrappers kept for base/header/internallink/media
- Class alias and rector rules added for backward compatibility

show more ...


# d4f83172 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: line breaks


# 615810c5 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

address issues mention in PR#4045


# 8c7c53b0 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

codestyle adjustments: class declaration braces


# a95427a5 29-Aug-2023 Andreas Gohr <andi@splitbrain.org>

Apply rector fixes to inc/Cache


# a8a3c3d9 26-Jan-2023 Andreas Gohr <andi@splitbrain.org>

update ParserCache dependency to reflect new file location


# 2b9be456 10-Nov-2022 Andreas Gohr <andi@splitbrain.org>

some more fixes for undefined vars

This makes more use of $INPUT to access $_SERVER and fixes a warning in
one of the search methods.


# c1ec88ce 01-May-2020 Andreas Gohr <andi@splitbrain.org>

remove calls to deprecated methods and classes


# b4b0b31b 22-Feb-2019 Michael Große <mic.grosse@googlemail.com>

Use deprecation helper

Instead of writing our own magic getters and setters for all variables
that used to be public, this adds a trait that does that in a generic
way.
This trait was copied from Me

Use deprecation helper

Instead of writing our own magic getters and setters for all variables
that used to be public, this adds a trait that does that in a generic
way.
This trait was copied from MediaWiki and adjusted to DokuWiki.
The original author seems to be @tgr Tisza Gergő

The downside of this trait is that the properties keep their
(potentially undesired) name. While that could be fixed within the
helper, that might add unnecessary complexity. The name can change when
support is dropped.

show more ...


# d2f1d7a1 14-Feb-2019 Michael Große <mic.grosse@googlemail.com>

Rename fields and add deprecated __get/__set

These fields might still be accessed from the outside, so in order to
not break backwards compatibility, this uses magic methods that emit
deprecation er

Rename fields and add deprecated __get/__set

These fields might still be accessed from the outside, so in order to
not break backwards compatibility, this uses magic methods that emit
deprecation errors.

show more ...


# 72c2bae8 04-Feb-2019 Michael Große <mic.grosse@googlemail.com>

Fix typo and rename method in comments too


# 42c00b45 02-Feb-2019 Michael Große <mic.grosse@googlemail.com>

Rename methods to conform with PSR 2

The method _useCache doesn't seem to be in use outside the core cache
classes[0], thus no deprecation placeholder was created.

[0]: https://codesearch.dokuwiki.

Rename methods to conform with PSR 2

The method _useCache doesn't seem to be in use outside the core cache
classes[0], thus no deprecation placeholder was created.

[0]: https://codesearch.dokuwiki.org/search?project=dokuwiki&project=plugin&project=template&q=&defs=&refs=_useCache&path=&hist=&type=php

show more ...


# 0db5771e 02-Feb-2019 Michael Große <mic.grosse@googlemail.com>

Refactor cache.php into different files