Skip to content

Commit 4293e44

Browse files
committed
doc
1 parent 38d252f commit 4293e44

File tree

6 files changed

+48
-5
lines changed

6 files changed

+48
-5
lines changed

src/core/cache/CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ Changelog
99
> - :house: [Internal]
1010
> - :nail_care: [Polish]
1111
12-
## v3.??.? (2022-0?-??)
12+
## v3.??.0 (2022-0?-??)
13+
14+
#### :boom: Breaking Change
15+
* Changed typed parameters of `Cache` interface from `<V, K>` to `<K, V>`
16+
* Change a default `Cache` interface key type
1317

1418
#### :rocket: New Feature
1519

16-
* Add a new method `clone`
20+
* Added new cache `DefaultCache`
21+
* Added a new method `clone`
1722

18-
#### :boom: Breaking Change
23+
#### :bug: Bug Fix
1924

20-
* Change type parameters from `<V, K>` to `<K, V>`
25+
* Fixed type inference in decorator
2126

2227
## v3.50.0 (2021-06-07)
2328

src/core/cache/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,29 @@ cache.clear();
227227

228228
console.log(cache.has('foo1')); // true
229229
```
230+
231+
### clone
232+
233+
Makes a new copy of the current cache and returns it.
234+
235+
```js
236+
import SimpleCache from 'core/cache/simple';
237+
238+
const
239+
cache = new SimpleCache(),
240+
obj = {foo: 'bar'};
241+
242+
cache.set('foo1', 'bar1');
243+
cache.set('foo2', obj);
244+
245+
const
246+
clonedCache = cache.clone();
247+
248+
console.log(cache !== clonedCache); // true
249+
250+
console.log(clonedCache.has('foo1')); // true
251+
console.log(clonedCache.has('foo2')); // true
252+
console.log(clonedCache.has('foo5')); // false
253+
254+
console.log(cache.get('foo2') === clonedCache.get('foo2')); // true
255+
```

src/core/cache/decorators/ttl/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Changelog
1313

1414
#### :bug: Bug Fix
1515

16-
* Fixed TS type inferring
16+
* Fixed type inference
1717

1818
#### :boom: Breaking Change
1919

src/core/cache/never/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Changelog
1515

1616
* Change type parameters from `<V, K>` to `<K, V>`
1717

18+
#### :rocket: New Feature
19+
20+
* Added a new `clone` method
21+
1822
## v3.50.0 (2021-06-07)
1923

2024
#### :rocket: New Feature

src/core/cache/restricted/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Changelog
1515

1616
* Change type parameters from `<V, K>` to `<K, V>`
1717

18+
#### :rocket: New Feature
19+
20+
* Added a new `clone` method
21+
1822
## v3.xx.x (2021-06-01)
1923

2024
#### :rocket: New Feature

src/core/cache/simple/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Changelog
1515

1616
* Change type parameters from `<V, K>` to `<K, V>`
1717

18+
#### :rocket: New Feature
19+
20+
* Added a new `clone` method
21+
1822
## v3.20.0 (2020-07-05)
1923

2024
#### :boom: Breaking Change

0 commit comments

Comments
 (0)