1 |
|
2 |
|
3 |
|
4 |
|
5 | export declare class CacheEntry {
|
6 | private _key;
|
7 | private _value;
|
8 | private _expiration;
|
9 | |
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | constructor(key: string, value: any, timeout: number);
|
17 | /**
|
18 | * Gets the key to locate the cached value.
|
19 | *
|
20 | * @returns the value key.
|
21 | */
|
22 | getKey(): string;
|
23 | /**
|
24 | * Gets the cached value.
|
25 | *
|
26 | * @returns the value object.
|
27 | */
|
28 | getValue(): any;
|
29 | /**
|
30 | * Gets the expiration timeout.
|
31 | *
|
32 | * @returns the expiration timeout in milliseconds.
|
33 | */
|
34 | getExpiration(): number;
|
35 | /**
|
36 | * Sets a new value and extends its expiration.
|
37 | *
|
38 | * @param value a new cached value.
|
39 | * @param timeout a expiration timeout in milliseconds.
|
40 | */
|
41 | setValue(value: any, timeout: number): void;
|
42 | /**
|
43 | * Checks if this value already expired.
|
44 | *
|
45 | * @returns true if the value already expires and false otherwise.
|
46 | */
|
47 | isExpired(): boolean;
|
48 | }
|