refactor: merge api/recipes and api/rezepte into unified recipeLang route
Consolidate duplicate recipe API routes into a single api/[recipeLang=recipeLang]/ structure. Both /api/recipes/ and /api/rezepte/ URLs continue to work via the param matcher. Shared read endpoints now serve both languages with caching for both. Also: remove dead code (5 unused components, cookie.js) and the redundant cron-execute recurring payment route.
This commit is contained in:
@@ -294,13 +294,10 @@ process.on('SIGINT', () => {
|
||||
*/
|
||||
export async function invalidateRecipeCaches(): Promise<void> {
|
||||
try {
|
||||
// Clear all recipe-related caches in parallel
|
||||
// Clear all recipe-related caches for both languages in parallel
|
||||
await Promise.all([
|
||||
cache.del('recipes:all_brief'),
|
||||
cache.delPattern('recipes:tag:*'),
|
||||
cache.delPattern('recipes:in_season:*'),
|
||||
cache.delPattern('recipes:category:*'),
|
||||
cache.delPattern('recipes:icon:*'),
|
||||
cache.delPattern('recipes:rezepte:*'),
|
||||
cache.delPattern('recipes:recipes:*'),
|
||||
]);
|
||||
} catch (err) {
|
||||
console.error('[Cache] Error invalidating recipe caches:', err);
|
||||
|
||||
Reference in New Issue
Block a user