# Verifier Optimisation
## Implement service worker
### Caching API calls
- Caching First Strategies
> Will look for a response in the cache first, if any response is found previously cached, it will return and serve the cache. If not it will fetch the response from the network, serve it, and cache it for next time.
- File API
- Provider fetch API
- Sources API
- Alert fetch API
- NPI fetch API
- OIG fetch API
- Stale-While-Revalidate Caching Strategies
> This strategy checks for the response in the cache. If it is available it is delivered, and the cache is revalidated. If it is not available, the service worker fetches the response from the network and caches it. (**There would be some delay with this approach but need to find a solution to overcome that.**)
- For other APIs
## Optimse Provider & Alert list
- Pre-fetch the first page for all filters on component mount, switching between filter would be faster.
- Fetching should be done on background for non-selected filters without blocking the UI.
## Cache provider detail for a selected provider (Store level caching)
- Cache the provider details data on store and serve it based on provider id.
- Reset the data when a different provider is fetched.