Skip to content

Releases: caijf/cache2

v3.1.6

Choose a tag to compare

@caijf caijf released this 02 Mar 09:36
  • feat: 优化内部工具方法和错误提示内容

Full Changelog: v3.1.5...v3.1.6

v3.1.5

Choose a tag to compare

@caijf caijf released this 11 Feb 03:28
  • feat(Cache): 优化获取缓存对象方式
  • feat(Cache): 优化超出最大限制替换策略

Full Changelog: v3.1.4...v3.1.5

v3.1.4

Choose a tag to compare

@caijf caijf released this 28 Jan 08:16
  • chore: update dev deps
  • build: 构建配置调整

Full Changelog: v3.1.3...v3.1.4

v3.1.3

Choose a tag to compare

@caijf caijf released this 15 Jan 10:47
  • feat: package.json添加browser字段

Full Changelog: v3.1.2...v3.1.3

v3.1.2

Choose a tag to compare

@caijf caijf released this 19 Nov 03:06
  • feat: 支持单个实例缓存多种数据类型

get set mget mset getAll take 等实例方法支持泛型。

例如:

const myCache = new Cache();

myCache.get<string>(key1);
myCache.get<number>(key2);

v2.0.7

Choose a tag to compare

@caijf caijf released this 22 Oct 03:17
  • chore: 提示调整

v3.1.1

Choose a tag to compare

@caijf caijf released this 19 Nov 03:03
  • feat: 优化文档和类型提示

v3.1.0

Choose a tag to compare

@caijf caijf released this 09 Sep 06:12
  • feat: Storage 支持 prefix 配置

v3.0.1

Choose a tag to compare

@caijf caijf released this 02 Sep 09:04
  • chore: 类型调整

v3.0.0

Choose a tag to compare

@caijf caijf released this 17 Jun 09:18
  • feat: 移除废弃模块 local session

由于原 local sessionStorage 实例不会触发 Tree shaking ,因此移除。

建议使用以下方式自定义 localsession

import { Storage } from 'cache2';

// const session = new Storage(window.sessionStorage); // 使用方法同 local
const local = new Storage(window.localStorage);

local.set('foo', { a: 1, b: ['bar'], c: ['x', 2, 3] });
local.get('foo'); // { a: 1, b: ['bar'], c: ['x', 2, 3] }

local.del('foo');
local.get('foo'); // undefined