Oliver Davies
0c91825c16
Create a cached version of the talk counter service that returns a cached result of the talk count for that day. This uses the Decorator design pattern to decorate the existing `TalkCounter` service and works as they both implement the same `TalkCounterInterface`.
25 lines
617 B
YAML
25 lines
617 B
YAML
services:
|
|
Drupal\Core\Cache\CacheBackendInterface:
|
|
alias: cache.default
|
|
private: true
|
|
|
|
Drupal\opdavies_talks\Repository\TalkRepository:
|
|
autowire: true
|
|
|
|
Drupal\opdavies_talks\Service\CachedTalkCounter:
|
|
autowire: true
|
|
|
|
Drupal\opdavies_talks\Service\TalkCounter:
|
|
autowire: true
|
|
|
|
Drupal\opdavies_talks\Service\TalkCounterInterface:
|
|
autowire: true
|
|
class: Drupal\opdavies_talks\Service\CachedTalkCounter
|
|
|
|
Drupal\opdavies_talks\Service\TalkDateUpdater:
|
|
autowire: true
|
|
|
|
Drupal\opdavies_talks\EventSubscriber\UpdateTalkNodeBeforeSave:
|
|
tags:
|
|
- { name: event_subscriber }
|