* Use backend-specific makeGlobalKey() method instead of
deprecated wfGlobalCacheKey().
* Call makeCacheKey() inline and reduce to only producing
part of the key (makeCacheKeyHash).
* Add a $ttl (1 month), instead of the previously unspecified
expiry (default: indefinite).
Change-Id: I913a768a3b61cc31ce14fa086a563ceecca7c603
The recursive call is somewhat counter-intuitive, and seems like it could
easily break if forgotten. Instead, move the part that we want to re-use
out into its own method.
Change-Id: I64ced0da211155299744d3c86f7818e751ad027e
* Move "empty tag" case to earlier in highlight() by comparing to
empty string without strlen(). Follows-up cda15b184.
* Turn "shell disabled" case into 'elseif' after length check,
instead of subsequent 'if'. That way, in case of a too large
string, we don't need to check if shell is disabled, and it
also provides the user with the size-related error instead of
the shell-related one.
* Add a few clarifying code comments.
Change-Id: Ib0ef9e683ac4aadd0461fe061ddbe9bfb0a27a82