Issue Bug Closed

#89895Streamline usage of caching API

Helmut Hummel 12/07/19, 20:52 updated 02/27/20, 12:42

Description

Use code cache properly instead of storing strings into it,
because it is proper usage of our API, removes the need
for stripping PHP code strings and improves performance
when Opcache is in use (which is recommended on production systems)

Additionally all calls to ->has are removed, except one place where
boolean values are stored in a runtime cache and in test,
because the API guarantees returning “false” when using ->get or ->require

Doing so reduces the amount of lookups on the backend storage (file_exists
for file backend, SQL queries for DB backend) and makes up more
straightforward code in most places (reduces cyclomatic complexity by removing
obsolete “else” branching.

Reviews 1