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
Section titled “Business Unit IDs”Business Unit IDs stay the same as long as a profile exists. You only need to fetch it once and cache it indefinitely.
TrustScores
Section titled “TrustScores”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.
Latest review data
Section titled “Latest review data”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.