Cache Duration
The cache automatically resets every 24 hours. After this period, new requests will fetch fresh data and update the cache accordingly.Skipping the cache may result in slightly increased response times as each request will be processed fresh. Use this option judiciously to balance between data freshness and performance.
How to Skip Cache
If you need to bypass the cache and retrieve fresh data, you can include thex-jigsaw-skip-cache
header in your requests.
JavaScript SDK
To skip caching in the JavaScript SDK, pass thex-jigsaw-skip-cache
header during initialization:
setup.ts
Python SDK
In the Python SDK, include thex-jigsaw-skip-cache
header when creating a JigsawStack instance:
setup.py
API
When using the raw API, include thex-jigsaw-skip-cache
header in your request:
When to Skip Cache
Consider skipping the cache in the following scenarios:- Real-time data requirements: When you need the absolute latest information and cannot tolerate any delay from cached data
- Critical updates: After making changes that affect the data, and you need to verify the updated results immediately
- Testing and debugging: When developing or troubleshooting to ensure you’re seeing current behavior