Skip to content

Data Solutions caching best practices

If you display Trustpilot data on your website or UI, you should use caching to minimize unnecessary calls to the API.

Business Unit IDs stay the same as long as a profile exists. You only need to fetch it once and cache it indefinitely.

It’s unlikely that a TrustScore will change quickly. Cache the TrustScore but refresh your cache every 24 hours to adhere to the Content Refresh Guidelines.

If you use the Get latest reviews for business unit endpoint, you should set your cache depending on how often you want to refresh the data. If you expect to receive new reviews hourly, you should refresh your cache hourly. If you don’t expect regular new reviews, you can fetch any new reviews every 24 hours. You should always avoid fetching data every time a page loads in your frontend.