Cache any HTTP/HTTPS URL and get 10x faster responses. Perfect for APIs, Google Sheets, and web resources.
All examples below will update to show your selected language
Avoid rate limits and speed up sheet access by 10x. Perfect for dashboards and data feeds.
// Cache a Google Sheet CSV export
const sheetId = 'your_sheet_id_here';
const sheetUrl = `https://docs.google.com/spreadsheets/d/${sheetId}/export?format=csv`;
const response = await fetch(`https://www.cachethings.com/api/fetch?url=${encodeURIComponent(sheetUrl)}`);
const csvData = await response.text();
// Parse the CSV data
const rows = csvData.split('\n').map(row => row.split(','));
console.log('Sheet data loaded from cache!', rows);
💡 Pro tip: Great for importing Google Sheets data into apps without hitting API limits
Speed up external API calls and reduce costs. Weather, news, social media APIs.
// Cache slow API responses
const weatherUrl = 'https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_KEY';
const response = await fetch(`https://www.cachethings.com/api/fetch?url=${encodeURIComponent(weatherUrl)}`);
const weather = await response.json();
console.log('Weather data:', weather);
console.log('Cache status:', response.headers.get('X-Cache')); // HIT or MISS
💡 Pro tip: Reduces API costs and improves user experience with instant responses
Always fresh, always fast. Perfect for metrics, analytics, and live data feeds.
// Perfect for dashboards - always fresh, always fast
const metricsUrl = 'https://api.your-service.com/metrics';
const response = await fetch(`https://www.cachethings.com/api/fetch?url=${encodeURIComponent(metricsUrl)}`);
const metrics = await response.json();
// Your dashboard gets instant responses while cache stays fresh in background
updateDashboard(metrics);
💡 Pro tip: Cache refreshes in background so your dashboard never waits
API → Cache → You
Fresh data, now cached
Cache → You
Instant responses
Cache → You + API → Cache
Instant + background update
Result: If you call the same URL regularly, your cache stays perpetually fresh while maintaining lightning-fast response times! ⚡
One endpoint, two parameters, that's it!
Protocol Support: Currently supports HTTP and HTTPS only. Other protocols (FTP, File, etc.) available in premium tier.
url
requiredThe URL to cache (must be URL-encoded). HTTPS will be added automatically if no protocol is specified.
force
optionalSet to true
to bypass cache and get fresh data
X-Cache: HIT
- Served from cache (fast!)X-Cache: MISS
- Fresh data, now cachedX-Cache: STALE-WHILE-REVALIDATE
- Cached data + background refresh