@@ -173,11 +173,13 @@ public function addSection(ClusterSection $section): void
173173 public function getAllAvailableLanguages (): array
174174 {
175175 if (! $ this ->cachedLanguages ) {
176- $ this ->cachedLanguages = $ this ->cacheManager ->remember (
177- InspireCmsConfig::get ('cache.languages.key ' ),
178- InspireCmsConfig::get ('cache.languages.ttl ' ),
179- fn () => $ this ->getSerializedLanguagesForCache ()
180- );
176+ $ this ->cachedLanguages = $ this ->cacheManager
177+ ->store (InspireCmsConfig::get ('cache.languages.store ' ))
178+ ->remember (
179+ InspireCmsConfig::get ('cache.languages.key ' ),
180+ InspireCmsConfig::get ('cache.languages.ttl ' ),
181+ fn () => $ this ->getSerializedLanguagesForCache ()
182+ );
181183 }
182184
183185 return collect ($ this ->cachedLanguages ['languages ' ] ?? [])
@@ -193,7 +195,9 @@ public function getFallbackLanguage(): ?LanguageDto
193195
194196 public function forgetCachedLanguages (): void
195197 {
196- $ this ->cacheManager ->forget (InspireCmsConfig::get ('cache.languages.key ' ));
198+ $ this ->cacheManager
199+ ->store (InspireCmsConfig::get ('cache.languages.store ' ))
200+ ->forget (InspireCmsConfig::get ('cache.languages.key ' ));
197201 }
198202
199203 /**
@@ -202,11 +206,13 @@ public function forgetCachedLanguages(): void
202206 public function getNavigation (string $ category , ?string $ locale = null ): array
203207 {
204208 if (! $ this ->cachedNavigation ) {
205- $ this ->cachedNavigation = $ this ->cacheManager ->remember (
206- InspireCmsConfig::get ('cache.navigation.key ' ),
207- InspireCmsConfig::get ('cache.navigation.ttl ' ),
208- fn () => $ this ->getSerializedNavigationForCache ()
209- );
209+ $ this ->cachedNavigation = $ this ->cacheManager
210+ ->store (InspireCmsConfig::get ('cache.navigation.store ' ))
211+ ->remember (
212+ InspireCmsConfig::get ('cache.navigation.key ' ),
213+ InspireCmsConfig::get ('cache.navigation.ttl ' ),
214+ fn () => $ this ->getSerializedNavigationForCache ()
215+ );
210216 }
211217
212218 return collect ($ this ->cachedNavigation ['navigation ' ] ?? [])
@@ -235,7 +241,9 @@ public function getNavigation(string $category, ?string $locale = null): array
235241
236242 public function forgetCachedNavigation (): void
237243 {
238- $ this ->cacheManager ->forget (InspireCmsConfig::get ('cache.navigation.key ' ));
244+ $ this ->cacheManager
245+ ->store (InspireCmsConfig::get ('cache.content_routes.store ' ))
246+ ->forget (InspireCmsConfig::get ('cache.navigation.key ' ));
239247 }
240248
241249 /**
@@ -244,11 +252,13 @@ public function forgetCachedNavigation(): void
244252 public function getContentRoutes ()
245253 {
246254 if (! $ this ->cachedContentRoutes ) {
247- $ this ->cachedContentRoutes = $ this ->cacheManager ->remember (
248- InspireCmsConfig::get ('cache.content_routes.key ' ),
249- InspireCmsConfig::get ('cache.content_routes.ttl ' ),
250- fn () => $ this ->getSerializedContentRoutesForCache ()
251- );
255+ $ this ->cachedContentRoutes = $ this ->cacheManager
256+ ->store (InspireCmsConfig::get ('cache.content_routes.store ' ))
257+ ->remember (
258+ InspireCmsConfig::get ('cache.content_routes.key ' ),
259+ InspireCmsConfig::get ('cache.content_routes.ttl ' ),
260+ fn () => $ this ->getSerializedContentRoutesForCache ()
261+ );
252262 }
253263
254264 return collect ($ this ->cachedContentRoutes ['routes ' ] ?? [])
@@ -258,7 +268,9 @@ public function getContentRoutes()
258268
259269 public function forgetCachedContentRoutes (): void
260270 {
261- $ this ->cacheManager ->forget (InspireCmsConfig::get ('cache.content_routes.key ' ));
271+ $ this ->cacheManager
272+ ->store (InspireCmsConfig::get ('cache.content_routes.store ' ))
273+ ->forget (InspireCmsConfig::get ('cache.content_routes.key ' ));
262274 }
263275
264276 // region Helpers
0 commit comments