@extra-memoize/extra-disk-cache 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /// <reference types="node" />
2
2
  import { ICache, State } from 'extra-memoize';
3
- import { DiskCache as ExtraDiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache as ExtraDiskCache } from 'extra-disk-cache';
4
4
  export declare class DiskCache<T> implements ICache<T> {
5
- cache: DiskCacheView<string, T>;
5
+ private cache;
6
6
  constructor(cache: ExtraDiskCache, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
7
7
  get(key: string): [State.Miss] | [State.Hit, T];
8
8
  set(key: string, value: T): void;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import { IStaleIfErrorCache, State } from 'extra-memoize';
3
- import { DiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache } from 'extra-disk-cache';
4
4
  export declare class StaleIfErrorDiskCache<T> implements IStaleIfErrorCache<T> {
5
5
  private timeToLive;
6
6
  private staleIfError;
7
- cache: DiskCacheView<string, T>;
7
+ private cache;
8
8
  constructor(cache: DiskCache, timeToLive: number, staleIfError: number, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
9
9
  get(key: string): [State.Miss] | [State.Hit | State.StaleIfError, T];
10
10
  set(key: string, value: T): void;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="node" />
2
2
  import { IStaleWhileRevalidateAndStaleIfErrorCache, State } from 'extra-memoize';
3
- import { DiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache } from 'extra-disk-cache';
4
4
  export declare class StaleWhileRevalidateAndStaleIfErrorDiskCache<T> implements IStaleWhileRevalidateAndStaleIfErrorCache<T> {
5
5
  private timeToLive;
6
6
  private staleWhileRevalidate;
7
7
  private staleIfError;
8
- cache: DiskCacheView<string, T>;
8
+ private cache;
9
9
  constructor(cache: DiskCache, timeToLive: number, staleWhileRevalidate: number, staleIfError: number, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
10
10
  get(key: string): [State.Miss] | [State.Hit | State.StaleWhileRevalidate | State.StaleIfError, T];
11
11
  set(key: string, value: T): void;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import { IStaleWhileRevalidateCache, State } from 'extra-memoize';
3
- import { DiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache } from 'extra-disk-cache';
4
4
  export declare class StaleWhileRevalidateDiskCache<T> implements IStaleWhileRevalidateCache<T> {
5
5
  private timeToLive;
6
6
  private staleWhileRevalidate;
7
- cache: DiskCacheView<string, T>;
7
+ private cache;
8
8
  constructor(cache: DiskCache, timeToLive: number, staleWhileRevalidate: number, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
9
9
  get(key: string): [State.Miss] | [State.Hit | State.StaleWhileRevalidate, T];
10
10
  set(key: string, value: T): void;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="node" />
2
2
  import { ICache, State } from 'extra-memoize';
3
- import { DiskCache as ExtraDiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache as ExtraDiskCache } from 'extra-disk-cache';
4
4
  export declare class DiskCache<T> implements ICache<T> {
5
- cache: DiskCacheView<string, T>;
5
+ private cache;
6
6
  constructor(cache: ExtraDiskCache, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
7
7
  get(key: string): [State.Miss] | [State.Hit, T];
8
8
  set(key: string, value: T): void;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import { IStaleIfErrorCache, State } from 'extra-memoize';
3
- import { DiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache } from 'extra-disk-cache';
4
4
  export declare class StaleIfErrorDiskCache<T> implements IStaleIfErrorCache<T> {
5
5
  private timeToLive;
6
6
  private staleIfError;
7
- cache: DiskCacheView<string, T>;
7
+ private cache;
8
8
  constructor(cache: DiskCache, timeToLive: number, staleIfError: number, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
9
9
  get(key: string): [State.Miss] | [State.Hit | State.StaleIfError, T];
10
10
  set(key: string, value: T): void;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="node" />
2
2
  import { IStaleWhileRevalidateAndStaleIfErrorCache, State } from 'extra-memoize';
3
- import { DiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache } from 'extra-disk-cache';
4
4
  export declare class StaleWhileRevalidateAndStaleIfErrorDiskCache<T> implements IStaleWhileRevalidateAndStaleIfErrorCache<T> {
5
5
  private timeToLive;
6
6
  private staleWhileRevalidate;
7
7
  private staleIfError;
8
- cache: DiskCacheView<string, T>;
8
+ private cache;
9
9
  constructor(cache: DiskCache, timeToLive: number, staleWhileRevalidate: number, staleIfError: number, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
10
10
  get(key: string): [State.Miss] | [State.Hit | State.StaleWhileRevalidate | State.StaleIfError, T];
11
11
  set(key: string, value: T): void;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import { IStaleWhileRevalidateCache, State } from 'extra-memoize';
3
- import { DiskCache, DiskCacheView } from 'extra-disk-cache';
3
+ import { DiskCache } from 'extra-disk-cache';
4
4
  export declare class StaleWhileRevalidateDiskCache<T> implements IStaleWhileRevalidateCache<T> {
5
5
  private timeToLive;
6
6
  private staleWhileRevalidate;
7
- cache: DiskCacheView<string, T>;
7
+ private cache;
8
8
  constructor(cache: DiskCache, timeToLive: number, staleWhileRevalidate: number, toBuffer?: (value: T) => Buffer, fromBuffer?: (buffer: Buffer) => T);
9
9
  get(key: string): [State.Miss] | [State.Hit | State.StaleWhileRevalidate, T];
10
10
  set(key: string, value: T): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extra-memoize/extra-disk-cache",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"
@@ -35,31 +35,31 @@
35
35
  }
36
36
  },
37
37
  "devDependencies": {
38
- "@blackglory/jest-matchers": "^0.4.1",
39
- "@commitlint/cli": "^17.0.3",
40
- "@commitlint/config-conventional": "^17.0.3",
41
- "@types/jest": "^27.5.1",
42
- "@typescript-eslint/eslint-plugin": "^5.32.0",
43
- "@typescript-eslint/parser": "^5.32.0",
44
- "eslint": "^8.21.0",
45
- "extra-disk-cache": "^0.8.1",
46
- "extra-memoize": "^0.8.0",
38
+ "@blackglory/jest-matchers": "^0.5.0",
39
+ "@commitlint/cli": "^17.3.0",
40
+ "@commitlint/config-conventional": "^17.3.0",
41
+ "@types/jest": "^29.2.3",
42
+ "@typescript-eslint/eslint-plugin": "^5.44.0",
43
+ "@typescript-eslint/parser": "^5.44.0",
44
+ "eslint": "^8.28.0",
45
+ "extra-disk-cache": "^0.8.4",
46
+ "extra-memoize": "^0.9.1",
47
47
  "husky": "^4.3.8",
48
- "jest": "^28.1.3",
48
+ "jest": "^29.3.1",
49
49
  "npm-run-all": "^4.1.5",
50
50
  "return-style": "^1.0.0",
51
51
  "rimraf": "^3.0.2",
52
52
  "standard-version": "^9.5.0",
53
- "ts-jest": "^28.0.7",
53
+ "ts-jest": "^29.0.3",
54
54
  "tscpaths": "^0.0.9",
55
- "tslib": "^2.3.1",
56
- "typescript": "^4.7.4"
55
+ "tslib": "^2.4.1",
56
+ "typescript": "^4.9.3"
57
57
  },
58
58
  "dependencies": {
59
- "@blackglory/prelude": "^0.1.3"
59
+ "@blackglory/prelude": "^0.1.8"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "extra-disk-cache": "^0.7.0 || ^0.8.0",
63
- "extra-memoize": "^0.6.0 || ^0.7.0 || ^0.8.0"
63
+ "extra-memoize": "^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0"
64
64
  }
65
65
  }