Launch Week Day 4: Introducing Data Exports.Learn More
Socket
Book a DemoSign in
Socket

@peerbit/cache

Package Overview
Dependencies
Maintainers
1
Versions
313
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peerbit/cache - npm Package Compare versions

Comparing version
2.0.6
to
2.1.0-3a75d6e
+29
dist/src/index.d.ts
export interface CacheData<T> {
value?: T | null;
time: number;
size: number;
}
type Key = string | bigint | number;
export declare class Cache<T = undefined> {
private _map;
private deleted;
private list;
currentSize: number;
deletedSize: number;
max: number;
ttl?: number;
constructor(options: {
max: number;
ttl?: number;
});
has(key: Key): boolean;
get map(): Map<Key, CacheData<T>>;
get(key: Key): T | null | undefined;
trim(time?: number): void;
del(key: Key): CacheData<T>;
add(key: Key, value?: T, size?: number): void;
clear(): void;
get size(): number;
}
export {};
//# sourceMappingURL=index.d.ts.map
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AACD,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AACpC,qBAAa,KAAK,CAAC,CAAC,GAAG,SAAS;IAC/B,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,OAAO,CAAW;IAC1B,OAAO,CAAC,IAAI,CAAe;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAEpB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;gBACD,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE;IASlD,GAAG,CAAC,GAAG,EAAE,GAAG;IAQZ,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAEhC;IAED,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS;IAQnC,IAAI,CAAC,IAAI,SAAc;IAyBvB,GAAG,CAAC,GAAG,EAAE,GAAG;IAUZ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,SAAI;IAWjC,KAAK;IAOL,IAAI,IAAI,WAEP;CACD"}
// Fifo
import yallist from "yallist";
export class Cache {
_map;
deleted;
list;
currentSize;
deletedSize;
max;
ttl;
constructor(options) {
if (options.max <= 0) {
throw new Error("Expecting max >= 0");
}
this.max = options.max;
this.ttl = options.ttl;
this.clear();
}
has(key) {
this.trim();
if (this.deleted.has(key)) {
return false;
}
return this._map.has(key);
}
get map() {
return this._map;
}
get(key) {
this.trim();
if (this.deleted.has(key)) {
return undefined;
}
return this._map.get(key)?.value;
}
trim(time = +new Date()) {
for (;;) {
const headKey = this.list.head;
if (headKey?.value != null) {
const cacheValue = this._map.get(headKey.value);
if (!cacheValue) {
throw new Error("Cache value not found");
}
const outOfDate = this.ttl != null && cacheValue.time < time - this.ttl;
if (outOfDate || this.currentSize > this.max) {
this.list.shift();
this._map.delete(headKey.value);
const wasDeleted = this.deleted.delete(headKey.value);
if (!wasDeleted) {
this.currentSize -= cacheValue.size;
}
}
else {
break;
}
}
else {
break;
}
}
}
del(key) {
const cacheValue = this._map.get(key);
if (cacheValue && !this.deleted.has(key)) {
this.deleted.add(key);
this.currentSize -= cacheValue.size;
return cacheValue;
}
return undefined;
}
add(key, value, size = 1) {
this.deleted.delete(key);
const time = +new Date();
if (!this._map.has(key)) {
this.list.push(key);
this.currentSize += size;
}
this._map.set(key, { time, value: value ?? null, size });
this.trim(time);
}
clear() {
this.list = yallist.create();
this._map = new Map();
this.deleted = new Set();
this.currentSize = 0;
}
get size() {
return this.currentSize;
}
}
//# sourceMapping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O,UAAU,CAAC;QACnB,CAAC;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,GAAG,CAAC,GAAQ,EAAE,KAAS,EAAE,IAAI,GAAG,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACzB,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACpB,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACtB,CAAC;IAED,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;CACD"}
+71
-45
{
"name": "@peerbit/cache",
"version": "2.0.6",
"description": "Simple cache",
"type": "module",
"publishConfig": {
"access": "public"
},
"files": [
"lib",
"src",
"!src/**/__tests__",
"!lib/**/__tests__",
"LICENSE"
],
"module": "lib/esm/index.js",
"types": "lib/esm/index.d.ts",
"exports": {
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js"
},
"repository": {
"type": "git",
"url": "https://github.com/dao-xyz/peerbit"
},
"homepage": "https://github.com/dao-xyz/peerbit",
"bugs": "https://github.com/dao-xyz/peerbit/issues",
"scripts": {
"clean": "shx rm -rf lib/*",
"build": "yarn clean && tsc -p tsconfig.json",
"test": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.ts --runInBand --forceExit",
"test:unit": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.unit.ts --runInBand --forceExit",
"test:integration": "node ../node_modules/.bin/jest test -c ../../../jest.config.integration.ts --runInBand --forceExit"
},
"license": "MIT",
"devDependencies": {
"@peerbit/time": "2.0.6",
"@types/yallist": "^4.0.1"
},
"dependencies": {
"yallist": "^4.0.0"
},
"localMaintainers": [
"dao.xyz"
],
"gitHead": "e50907578b203c2f16199e91545c5213cf8cdc3e"
"name": "@peerbit/cache",
"version": "2.1.0-3a75d6e",
"description": "Simple cache",
"type": "module",
"types": "./dist/src/index.d.ts",
"typesVersions": {
"*": {
"*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
],
"src/*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
]
}
},
"files": [
"src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
}
},
"eslintConfig": {
"extends": "peerbit",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
"!.aegir.js",
"test/ts-use",
"*.d.ts"
]
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/dao-xyz/peerbit"
},
"homepage": "https://github.com/dao-xyz/peerbit",
"bugs": "https://github.com/dao-xyz/peerbit/issues",
"scripts": {
"clean": "aegir clean",
"build": "aegir build --no-bundle",
"test": "aegir test",
"lint": "aegir lint"
},
"license": "MIT",
"devDependencies": {
"@peerbit/time": "2.0.7-3a75d6e",
"@types/yallist": "^4.0.4"
},
"dependencies": {
"yallist": "^4.0.0"
},
"localMaintainers": [
"dao.xyz"
]
}
// Fifo
import yallist from "yallist";
export type CacheData<T> = { value?: T | null; time: number; size: number };
export interface CacheData<T> {
value?: T | null;
time: number;
size: number;
}
type Key = string | bigint | number;
export class Cache<T = undefined> {
private _map: Map<string, CacheData<T>>;
private deleted: Set<string>;
private list: yallist<string>;
private _map: Map<Key, CacheData<T>>;
private deleted: Set<Key>;
private list: yallist<Key>;
currentSize: number;

@@ -22,3 +27,4 @@ deletedSize: number;

}
has(key: string) {
has(key: Key) {
this.trim();

@@ -31,7 +37,7 @@ if (this.deleted.has(key)) {

get map(): Map<string, CacheData<T>> {
get map(): Map<Key, CacheData<T>> {
return this._map;
}
get(key: string): T | null | undefined {
get(key: Key): T | null | undefined {
this.trim();

@@ -47,6 +53,8 @@ if (this.deleted.has(key)) {

const headKey = this.list.head;
if (headKey?.value !== undefined) {
const cacheValue = this._map.get(headKey.value)!;
const outOfDate =
this.ttl !== undefined && cacheValue.time < time - this.ttl;
if (headKey?.value != null) {
const cacheValue = this._map.get(headKey.value);
if (!cacheValue) {
throw new Error("Cache value not found");
}
const outOfDate = this.ttl != null && cacheValue.time < time - this.ttl;
if (outOfDate || this.currentSize > this.max) {

@@ -68,4 +76,4 @@ this.list.shift();

del(key: string) {
const cacheValue = this._map.get(key)!;
del(key: Key) {
const cacheValue = this._map.get(key);
if (cacheValue && !this.deleted.has(key)) {

@@ -79,3 +87,3 @@ this.deleted.add(key);

add(key: string, value?: T, size = 1) {
add(key: Key, value?: T, size = 1) {
this.deleted.delete(key);

@@ -90,2 +98,3 @@ const time = +new Date();

}
clear() {

@@ -92,0 +101,0 @@ this.list = yallist.create();

export type CacheData<T> = {
value?: T | null;
time: number;
size: number;
};
export declare class Cache<T = undefined> {
private _map;
private deleted;
private list;
currentSize: number;
deletedSize: number;
max: number;
ttl?: number;
constructor(options: {
max: number;
ttl?: number;
});
has(key: string): boolean;
get map(): Map<string, CacheData<T>>;
get(key: string): T | null | undefined;
trim(time?: number): void;
del(key: string): CacheData<T> | undefined;
add(key: string, value?: T, size?: number): void;
clear(): void;
get size(): number;
}
// Fifo
import yallist from "yallist";
export class Cache {
_map;
deleted;
list;
currentSize;
deletedSize;
max;
ttl;
constructor(options) {
if (options.max <= 0) {
throw new Error("Expecting max >= 0");
}
this.max = options.max;
this.ttl = options.ttl;
this.clear();
}
has(key) {
this.trim();
if (this.deleted.has(key)) {
return false;
}
return this._map.has(key);
}
get map() {
return this._map;
}
get(key) {
this.trim();
if (this.deleted.has(key)) {
return undefined;
}
return this._map.get(key)?.value;
}
trim(time = +new Date()) {
for (;;) {
const headKey = this.list.head;
if (headKey?.value !== undefined) {
const cacheValue = this._map.get(headKey.value);
const outOfDate = this.ttl !== undefined && cacheValue.time < time - this.ttl;
if (outOfDate || this.currentSize > this.max) {
this.list.shift();
this._map.delete(headKey.value);
const wasDeleted = this.deleted.delete(headKey.value);
if (!wasDeleted) {
this.currentSize -= cacheValue.size;
}
}
else {
break;
}
}
else {
break;
}
}
}
del(key) {
const cacheValue = this._map.get(key);
if (cacheValue && !this.deleted.has(key)) {
this.deleted.add(key);
this.currentSize -= cacheValue.size;
return cacheValue;
}
return undefined;
}
add(key, value, size = 1) {
this.deleted.delete(key);
const time = +new Date();
if (!this._map.has(key)) {
this.list.push(key);
this.currentSize += size;
}
this._map.set(key, { time, value: value ?? null, size });
this.trim(time);
}
clear() {
this.list = yallist.create();
this._map = new Map();
this.deleted = new Set();
this.currentSize = 0;
}
get size() {
return this.currentSize;
}
}
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,MAAM,OAAO,KAAK;IACT,IAAI,CAA4B;IAChC,OAAO,CAAc;IACrB,IAAI,CAAkB;IAC9B,WAAW,CAAS;IACpB,WAAW,CAAS;IAEpB,GAAG,CAAS;IACZ,GAAG,CAAU;IACb,YAAY,OAAsC;QACjD,IAAI,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,oBAAoB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