Skip to content

Commit b5a9228

Browse files
committed
Removed memcached support
1 parent fb4c9b0 commit b5a9228

File tree

4 files changed

+8
-47
lines changed

4 files changed

+8
-47
lines changed

resources/upsun/ibexa-headless/5.0/.platform.app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ mounts:
120120
'var/log':
121121
source: local
122122
source_path: log
123-
# [PE Cluster] For cluster it's recommended to rather use a performant shared session storage like Redis/Memcached.
123+
# [PE Cluster] For cluster it's recommended to rather use a performant shared session storage like Redis.
124124
'var/sessions':
125125
source: local
126126
source_path: sessions

resources/upsun/ibexa-oss/5.0/.platform.app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ mounts:
118118
'var/log':
119119
source: local
120120
source_path: log
121-
# [PE Cluster] For cluster it's recommended to rather use a performant shared session storage like Redis/Memcached.
121+
# [PE Cluster] For cluster it's recommended to rather use a performant shared session storage like Redis.
122122
'var/sessions':
123123
source: local
124124
source_path: sessions

src/bundle/DependencyInjection/IbexaCloudExtension.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,12 @@ private function configureUpsunSetup(ContainerBuilder $container): void
103103
return;
104104
}
105105

106-
$cacheType = $envVars['CACHE_POOL'];
107-
$configFile = match ($cacheType) {
108-
'cache.redis' => 'cache.redis.yaml',
109-
'cache.memcached' => 'cache.memcached.yaml',
110-
default => null,
111-
};
112-
113-
if ($configFile === null) {
114-
return;
106+
if ($envVars['CACHE_POOL'] === 'cache.redis') {
107+
$loader = new YamlFileLoader(
108+
$container,
109+
new FileLocator($projectDir . '/config/packages/cache_pool')
110+
);
111+
$loader->load('cache.redis.yaml');
115112
}
116-
117-
$loader = new YamlFileLoader(
118-
$container,
119-
new FileLocator($projectDir . '/config/packages/cache_pool')
120-
);
121-
$loader->load($configFile);
122113
}
123114
}

src/bundle/DependencyInjection/UpsunEnvVarLoader.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ private function buildCacheEnvVars(array $groupedRelationships): array
164164
$envVars = [];
165165
$cachePoolSet = false;
166166

167-
// Process Redis/Valkey first (always preferred over memcached)
168167
foreach (['redis', 'valkey'] as $scheme) {
169168
if (!isset($groupedRelationships[$scheme])) {
170169
continue;
@@ -197,35 +196,6 @@ private function buildCacheEnvVars(array $groupedRelationships): array
197196
}
198197
}
199198

200-
// Process Memcached (fallback, only sets cache_pool if redis wasn't found)
201-
if (isset($groupedRelationships['memcached'])) {
202-
foreach ($groupedRelationships['memcached'] as $key => $endpoints) {
203-
$key = strtoupper($key);
204-
205-
foreach (array_values($endpoints) as $i => $endpoint) {
206-
$prefix = $this->buildPrefix($key, $i);
207-
208-
$host = $endpoint['host'] ?? '';
209-
$port = $endpoint['port'] ?? 0;
210-
211-
$envVars["{$prefix}HOST"] = $host;
212-
$envVars["{$prefix}PORT"] = (string) $port;
213-
214-
if (!$cachePoolSet) {
215-
trigger_deprecation(
216-
'ibexa/cloud',
217-
'5.0.5',
218-
'Usage of Memcached is deprecated, redis is recommended',
219-
);
220-
221-
$envVars[$this->getEnvKey('cache_pool')] = 'cache.memcached';
222-
$envVars[$this->getEnvKey('cache_dsn')] = sprintf('%s:%d', $host, $port);
223-
$cachePoolSet = true;
224-
}
225-
}
226-
}
227-
}
228-
229199
return $envVars;
230200
}
231201

0 commit comments

Comments
 (0)