psr/simple-cache interface.
Enabling caching
Enabling caching is as simple as providing a cache implementation to thePhiki::cache() method.
codeToHtml(). The cache will store the generated HTML for each unique combination of code, grammar, theme(s), gutter setting and Transformer class.
Cache invalidation
Phiki does not include any built-in cache invalidation mechanism apart from a change in the cache key. If you need to invalidate the cache for any reason, you must do so using the methods provided by your chosen cache implementation.Caching individual snippets
If you don’t want to cache all syntax highlighted code, you can also cache individualcodeToHtml() calls by passing a cache implementation to the PendingHtmlOutput::cache() method.