This value defines the cache Time to Live (TTL) for your ActiveCampaign data in the Memberium database in seconds. Contact caching was one of the original features that Memberium was designed to support since version 0.1.
The default value is 0, which means no caching, the contact records will be refreshed on each and every login.
To cache the data for one hour, you would set the Cache Age to 3600. To cache the data for one day, you would set the Cache Age to 86400.
There is no upper limit on the amount of time you can cache the contacts for. The lower limit is 0.
What is Caching?
ActiveCampaign data can be expensive to retrieve because of the relatively long time it takes to send the request to the ActiveCampaign servers and then retrieve the results.
Caching can be used to store this data in the WordPress database for a set amount of time (defined by this setting) so that Memberium does not have to contact ActiveCampaign each time a user logs in. This has the result of decreasing the loading time experienced during login.
Memberium allows you to define how long your ActiveCampaign data will be locally stored and used before refreshing it from ActiveCampaign servers. This setting is called “Maximum Contact Cache Age” and can be found under the Settings > Performance Tab:
Why do I want this?
Memberium employs algorithms to cache your ActiveCampaign contact data locally for faster access. Retrieving data in realtime at login from ActiveCampaign is significantly slower than retrieving the data locally. By using caching, your system performs faster, can handle more users, uses less API, and can make your system more scalable and reliable by decreasing the constant dependency on the API
Updating the Cache Early
To update the Memberium Cache with new data before it expires, you should use the Update Contact Webhook function to notify Memberium that there is an update to a contact. The best way to implement this is by following the linked guide that will fully automate that process. Each time an update happens in ActiveCampaign, ActiveCampaign will fire the webhook that notifies Memberium of the update.
Interested in taking your site performance and scalability to the next level? Have questions about implementing this? Contact us by going to memberium.com/support