What is the suggested practice for caching an identification token provided by the Visitor Identification API token? The docs suggest "Tokens are temporary and will expire after 12 hours. Tokens can be cached to avoid re-fetching the token on every page load, as long as they are refreshed at least every 12 hours."
What is the best practice here? Can these be stored on the client (ie cookies, local storage, etc) or do they need to be cached in a database.
It's a great question. I would definitely store a Visitor Identification API token on the server-side(database) with other user credentials. The same user might use different devices and browsers. Optionally, It might be a good idea to store the token in client-side(local storage, session storage) to avoid refetching the token on the next page load.
It's a great question. I would definitely store a Visitor Identification API token on the server-side(database) with other user credentials. The same user might use different devices and browsers. Optionally, It might be a good idea to store the token in client-side(local storage, session storage) to avoid refetching the token on the next page load.