Caching Aprimo Content
Aprimo Caching Patterns
When creating an integration with Aprimo its important to cache Aprimo data so your integration can retrieve data from Aprimo without always relying on HTTP requests. There are 2 main caching patterns for this and each pattern is best suited to different use cases. If your use case involves browsing Aprimo assets then the On-Demand pattern is best suited to the use case. If your use case involved using Aprimo data in aggregation or creating content that derives from Aprimo data then the Proactive pattern would best suit your use case.
On-Demand Caching
The On-Demand caching pattern will store Aprimo REST API results locally, and then reference those local versions until they become stale. If your use case involves browsing Aprimo assets, or just working with a single Aprimo asset, then On-Demand is the recommended pattern to use. Typically data can be configured to be considered stale after 10 minutes, but this may differ depending on your organization. After the results have become stale, make the HTTP request to Aprimo to get fresh data.
Proactive Caching
Proactive Caching involves making use of Aprimo DAM Rules and Aprimo Productivity Webhooks which will allows Aprimo to notify your integration of changes that occur in Aprimo. The Proactive Cache is best suited for use cases where your integration will be aggregating data from Aprimo or creating new content out of Aprimo data. This includes integrations that display a carousel of Aprimo images, or aggregate usage stats to display them in a graph. Your integration will store a local copy of Aprimo data and update it as Aprimo sends updates to the integration.