Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jclee100's avatar

Storing user data from API to cache, session or user table?

I am working with an API. (Google AdWords API)

The user has to authorise his Google account on my app and I can retrieve his account information.

As the API call to get the data takes about 2 seconds, I don't want to call the API every page request.

Considering that the user can log in on Google's end and change that information, what's the optimal way to handle this?

0 likes
1 reply
JoolsMcFly's avatar

I worked on a similar app a while ago and we offered our users an "account synchronization" tool. It would connect to their AdWords account and sync the entire structure, bringing over to our DB all adgroups, ads, keywords, bid info etc and delete obsolete data where it applies.

Please or to participate in this conversation.