[ 'shopify-refresh' => [ 'props' => [ 'products' => function() { return getShopifyProducts(); } ], ] ], 'routes' => [ [ 'pattern' => 'shopify/refresh-cache.json', 'method' => 'POST', 'action' => function() { if (!kirby()->user()) { return [ 'status' => 'error', 'message' => 'Unauthorized' ]; } try { kirby()->cache('shopify')->flush(); $products = fetchShopifyProducts(); return [ 'status' => 'success', 'message' => 'Cache Shopify rafraîchi avec succès', 'count' => count($products), 'products' => $products ]; } catch (\Throwable $e) { return [ 'status' => 'error', 'message' => 'Erreur lors du rafraîchissement du cache', 'details' => $e->getMessage() ]; } } ] ] ]);