Releases: fregante/webext-storage-cache
Releases · fregante/webext-storage-cache
v6.0.3
v6.0.0
Breaking changes
The API has changed to improve type safety and extend the capabilities of cache.function
.
Migration guide
You can use the legacy API for a gradual migration, but you should start using the new functions before the next major version.
// v5
await cache.set('user-id', 510, {days: 2});
const id = await cache.get('user-id');
// v6
const idCache = new CachedValue('user-id', {maxAge: {days: 2}});
await idCache.set(510);
const id = await idCache.get();
// v5
const cachedGetHTML = cache.function(getHTML, {
cacheKey: args => args.join(','),
maxAge: {days: 2},
});
const html = await cachedGetHTML('info.html');
// v6
const cache = new CachedFunction('html', {
maxAge: {days: 2},
);
const html = await cache.get('info.html');
Bugfixes
v5.1.1
v5.1.0
v5.0.1
v5.0.0
Changes
It should not bring any breaking changes, but I released it as a major version for safety. The minimum browser version probably increased slightly due to the "es2020" TypeScript output.