Problem/Motivation

Direct database calls are strongly discouraged in Drupal 8. They limit backend swapability, and do not necessarily grant performance advantages sought. We use direct database calls extensively in the flag counts API, since a config or content entity was deemed Not The Right Thing.

Proposed resolution

Replace calls to the database with the Drupal 8 Cache API using tags.

Examples here: https://api.drupal.org/api/drupal/core%21modules%21system%21core.api.php...

Remaining tasks

Create patch.

User interface changes

None.

API changes

The API should remain unchanged, but no table will be available.

Comments

socketwench’s picture

Postponed out of the gate for https://www.drupal.org/node/2467413

joachim’s picture

Isn't this sort of what I suggested ages ago?

If we change the flag counts to be cached data, then we need to change how we use them.

socketwench’s picture

Status: Postponed » Closed (duplicate)