How to use the @aws-amplify/cache.setItem function in @aws-amplify/cache

To help you get started, we’ve selected a few @aws-amplify/cache examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-js / packages / analytics / src / Providers / AWSPinpointProvider.ts View on Github external
private async _getEndpointId(cacheKey) {
		// try to get from cache
		let endpointId = await Cache.getItem(cacheKey);
			'endpointId from cache',
			typeof endpointId
		if (!endpointId) {
			endpointId = uuid();
			Cache.setItem(cacheKey, endpointId);
		return endpointId;


Cache category of aws-amplify

Latest version published 7 months ago

Package Health Score

91 / 100
Full package analysis

Similar packages