We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我的需求是为了不影响用户体验,不管数据是否过期先用存储的数据,如果过期了重新获取重新处理一遍,在处理的函数里面使用add函数时发现虽然判断语句内在storage的key 存在时不会set,但是我在add后发现通过get 返回值为true,导致我后面判断是否过期的条件语句内始终不会执行,而且过期时间也在更新,表明数据更新了。我把那个if的条件改成this.storage.getItem(key) 后也就是直接通过localstorage或者sessionstorage取值判断就正常了。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我的需求是为了不影响用户体验,不管数据是否过期先用存储的数据,如果过期了重新获取重新处理一遍,在处理的函数里面使用add函数时发现虽然判断语句内在storage的key 存在时不会set,但是我在add后发现通过get 返回值为true,导致我后面判断是否过期的条件语句内始终不会执行,而且过期时间也在更新,表明数据更新了。我把那个if的条件改成this.storage.getItem(key) 后也就是直接通过localstorage或者sessionstorage取值判断就正常了。
The text was updated successfully, but these errors were encountered: