We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 36f2b7b + e8be6ea commit 86475dbCopy full SHA for 86475db
src/MemcacheServiceProvider.php
@@ -0,0 +1,23 @@
1
+<?php
2
+
3
+namespace Drupal\memcache;
4
5
+use Drupal\Core\DependencyInjection\ContainerBuilder;
6
+use Drupal\Core\DependencyInjection\ServiceProviderBase;
7
8
+/**
9
+ * When Memcache module is enabled, set the backend cache to memcache.
10
+ */
11
+class MemcacheServiceProvider extends ServiceProviderBase {
12
13
+ /**
14
+ * {@inheritdoc}
15
16
+ public function alter(ContainerBuilder $container) {
17
+ $definition = $container->getDefinition('cache.backend.chainedfast');
18
+ $arguments = $definition->getArguments();
19
+ $arguments[1] = 'cache.backend.memcache';
20
+ $definition->setArguments($arguments);
21
+ $container->setDefinition('cache.backend.chainedfast', $definition);
22
+ }
23
+}
0 commit comments