Score:0

What is the backend_overridable service tag usable for?

in flag

On some core services, I see they have a tag of backend_overridable. I see this changelog, but is there an example?

https://www.drupal.org/node/2306083

Is that essentially what something like Memcache is doing?

$settings['cache']['default'] = 'cache.backend.memcache';
Score:0
cn flag

This is an example:

views/views.services.yml

  views.date_sql:
    class: Drupal\views\Plugin\views\query\MysqlDateSql
    arguments: ['@database']
    tags:
      - { name: backend_overridable }
  pgsql.views.date_sql:
    class: Drupal\views\Plugin\views\query\PostgresqlDateSql
    arguments: ['@database']
    public: false
  sqlite.views.date_sql:
    class: Drupal\views\Plugin\views\query\SqliteDateSql
    arguments: ['@database']
    public: false

Which makes it possible to query dates differently depending on the default backend.

Cache bins can have a default backend, too. But this has a different meaning and can be overridden as described here https://www.drupal.org/node/2754947.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.