adobe / acc-js-sdk

A JavaScript SDK for Adobe Campaign Classic
Apache License 2.0
21 stars 20 forks source link

Clear storage cache if the sdk versions or the instances are different #66

Closed junliadobe closed 1 year ago

junliadobe commented 1 year ago

Description

When creating a new "Client" object, we check in the storage if there're some irrelevant acc.js.sdk cache items: containing other sdk versions or cache for other instances.

Related Issue

Motivation and Context

in the case of using localStorage, whose size is limited to 5Mb, the irrelevant caches take space

How Has This Been Tested?

A unit test has been added

Screenshots (if appropriate):

Types of changes

Checklist: