Caching
By default, the ToughClicks library caches certain API requests to provide faster load times and reduce the number of API requests made. ToughClicks does not cache any sensitive information.
The default cache is 24 hours. You can override this by passing a new TTL in milliseconds.
const { ToughClicks } = window.ToughClicks
const tc = new ToughClicks(clientToken, packetId);
const newTTL = 1000 * 60 * 60 * 24 * 1; //24 Hours
tc.setTTL(newTTL);
Disable Caching
If you want to disable caching entirely, you can do so by setting the ttl to 0.
tc.setTTL(0);
Updated 8 months ago