You are here

example.services.yml in Memcache API and Integration 8.2

File

example.services.yml
View source
  1. # This file contains example services overrides.
  2. #
  3. # Enable with this line in settings.php
  4. # $settings['container_yamls'][] = $app_root . '/modules/contrib/memcache/example.services.yml';
  5. #
  6. # Or copy & paste the desired services into sites/default/services.yml.
  7. #
  8. # Note that the memcache module must be enabled for this to work.
  9. services:
  10. # Timestamp invalidation service used for invalidation logic.
  11. memcache.timestamp.invalidator.tag:
  12. class: Drupal\memcache\Invalidator\MemcacheTimestampInvalidator
  13. # Remember to use the same bin as the bootstrap container if you are using it!
  14. # Adjust tolerance factor as appropriate when not running memcache on localhost.
  15. arguments: ['@memcache.factory', 'memcache_tag_timestamps', 0.001]
  16. # Cache tag checksum backend. Used by memcache and most other cache backends
  17. # to deal with cache tag invalidations.
  18. cache_tags.invalidator.checksum:
  19. class: Drupal\memcache\Cache\TimestampCacheTagsChecksum
  20. arguments: ['@memcache.timestamp.invalidator.tag']
  21. tags:
  22. - { name: cache_tags_invalidator }
  23. # Replaces the default lock backend with a memcache implementation.
  24. lock:
  25. class: Drupal\Core\Lock\LockBackendInterface
  26. factory: ['@memcache.lock.factory', get]