1.1.5 • Published 12 months ago

@deot/helper-cache v1.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

@deot/helper-cache

缓存管理(Storage / Cookie / IndexDB

Storage/Cookie/IndexDB

IndexDB 返回的是Promise

import { Cookie, Storage, IndexDB } from '@deot/helper-cache';
// or
import { Cookie, Storage, IndexDB } from '@deot/helper';

get

Storage.get(key: string, options?: object)

获取缓存中对应的值

  • key: 键值
  • options: 配置项

示例

Storage.get('key');

set

Storage.set(key: string, value: any, options?: object)

设置缓存

  • key: 键值
  • value: 缓存
  • options: 配置项

示例

Storage.set('key', {});

remove

Storage.remove(key: string, options?: object)

清楚缓存

  • key: 键值
  • options: 配置项

示例

Storage.remove('key');

configure

Storage.configure(options: object)

设置版本号

  • options: 配置项

示例

Storage.configure({ version: '1.0.0' });
1.1.5

12 months ago

1.1.4

12 months ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago