Rocky_Mountain_Vending/.pnpm-store/v10/files/ce/af0e9750e9d1d08629d5725eb146f7b930776a010dce4830f5039c3913077ad920e2201f8784bbcd14e238a26bb49a450361c1d5e34c4c53a7bec53245116b
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

16 lines
No EOL
766 B
Text

import { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment';
export function createRouterCacheKey(segment, withoutSearchParameters = false) {
// if the segment is an array, it means it's a dynamic segment
// for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.
if (Array.isArray(segment)) {
return `${segment[0]}|${segment[1]}|${segment[2]}`;
}
// Page segments might have search parameters, ie __PAGE__?foo=bar
// When `withoutSearchParameters` is true, we only want to return the page segment
if (withoutSearchParameters && segment.startsWith(PAGE_SEGMENT_KEY)) {
return PAGE_SEGMENT_KEY;
}
return segment;
}
//# sourceMappingURL=create-router-cache-key.js.map