Refresh frequency

Hi everyone,

I’m building an application using the LexActivator library (in NodeJS if that matters) and I’m running into an issue related to how one can refresh the license data.

From the documentation it looks as if after one activates the license a periodic callback is set up that will refresh the data. That refresh can be configured to occur every day as a low end.

Our use case requires that the license data be up to date every time a query is sent to our service – we are essentially making an endpoint which can return the license data on request by wrapping the LexActivator functionality inside a web API.

My question is simply: Is there a way to force a refresh of the data on demand or do we have to wait a day for a resynchronization to occur?

Thanks for any help you can provide!

Hi,

The minimum refresh frequency is 3600 seconds does that solve your problem? It was one day in the old v2 version.

Hi Adnan,

It does and it doesn’t.

I think that we can live with a 1 hour refresh but I was hoping there was a way to force a refresh quicker than that via the API. However, the more we’ve thought about it the less useful that seems (honestly, I can’t think of a reason why 1 hour isn’t often enough for a production build).

It would be nice to be able to set the synchronization to a minute or less so that a real world test can occur in a reasonable timeframe.

So, just for clarity’s sake, it’s not possible to force the license to be re-evaluated quicker than 1 hour without re-initializing everything, is it?

The license activation data usually won’t change often, unless you suspend, extend, renew or change any other license property.

If 3600 seconds is not enough, you have two options either subscribe to ‘Small Business’ or higher plan which allows upto 60 seconds server sync interval, or invoke ActivateLicense () which will cause a synchronous server sync.

The difference between IsProductGenuine() server sync and ActivateLicense () server sync is that in the former case sync occurs using the activation id being used to find the activation in the database and in the later it occurs by doing a fingerprint match to find the activation, which makes former slightly faster.

So, just for clarity’s sake, it’s not possible to force the license to be re-evaluated quicker than 1 hour without re-initializing everything, is it?

You don’t need to reinitialise everything, just invoke ActivateLicense () instead of IsProductGenuine(). Please note this approach will always require an internet connection, unlike IsProductGenuine().