example.services.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # This file contains example services overrides.
  2. #
  3. # Enable with this line in settings.php
  4. # $settings['container_yamls'][] = 'modules/redis/example.services.yml';
  5. #
  6. # Or copy & paste the desired services into sites/default/services.yml.
  7. #
  8. # Note that the redis module must be enabled for this to work.
  9. services:
  10. # Cache tag checksum backend. Used by redis and most other cache backend
  11. # to deal with cache tag invalidations.
  12. cache_tags.invalidator.checksum:
  13. class: Drupal\redis\Cache\RedisCacheTagsChecksum
  14. arguments: ['@redis.factory']
  15. tags:
  16. - { name: cache_tags_invalidator }
  17. # Replaces the default lock backend with a redis implementation.
  18. lock:
  19. class: Drupal\Core\Lock\LockBackendInterface
  20. factory: ['@redis.lock.factory', get]
  21. # Replaces the default persistent lock backend with a redis implementation.
  22. lock.persistent:
  23. class: Drupal\Core\Lock\LockBackendInterface
  24. factory: ['@redis.lock.factory', get]
  25. arguments: [true]
  26. # Replaces the default flood backend with a redis implementation.
  27. flood:
  28. class: Drupal\Core\Flood\FloodInterface
  29. factory: ['@redis.flood.factory', get]