File tree Expand file tree Collapse file tree 4 files changed +8
-47
lines changed
src/bundle/DependencyInjection Expand file tree Collapse file tree 4 files changed +8
-47
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments