              const timestamp = localStorage.getItem(CONFIG.CACHE_TIMESTAMP_KEY);
                if (content && timestamp && (Date.now() - parseInt(timestamp) < CONFIG.CACHE_DURATION)) {
                    return JSON.parse(content);
                }
            } catch (error) {
                console.warn('Cache read error:', error);
            }
            return null;
        }

        function setCachedContent(content) {
            try {
                localStorage.setItem(CONFIG.CACHE_KEY, JS