/** * URL Parser with LRU Cache * * Caching mechanism to reduce `new URL()` creation cost * * @module utils/url-parser */ /** * Parse query string from URL with caching * * Cache query parameters of frequently called URLs to improve performance * because `new URL()` creation cost is high. * * @param url - Request URL (e.g., '/users?page=1&limit=10') * @returns Parsed query parameters * * @example * ```typescript * const query = parseQuery('/users?page=1&limit=10') * // { page: '1', limit: '10' } * ``` * * @performance * - First call: URL parsing cost (slow) * - Repeated calls: Cache lookup (very fast, 20-30% performance improvement) */ export declare function parseQuery(url: string): Record; /** * Parse full URL (path + query) * * Parse entire URL to separate path and query. * * @param url - Request URL * @returns Object with path and query * * @example * ```typescript * const { path, query } = parseUrl('/users?page=1') * // path: '/users', query: { page: '1' } * ``` */ export declare function parseUrl(url: string): { path: string; query: Record; }; /** * Clear cache (for testing) */ export declare function clearQueryCache(): void; /** * Return cache size (for testing/debugging) */ export declare function getQueryCacheSize(): number; //# sourceMappingURL=url-parser.d.ts.map