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