File tree Expand file tree Collapse file tree 6 files changed +48
-5
lines changed Expand file tree Collapse file tree 6 files changed +48
-5
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,20 @@ Changelog
9
9
> - :house : [ Internal]
10
10
> - :nail_care : [ Polish]
11
11
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
13
17
14
18
#### :rocket : New Feature
15
19
16
- * Add a new method ` clone `
20
+ * Added new cache ` DefaultCache `
21
+ * Added a new method ` clone `
17
22
18
- #### : boom : Breaking Change
23
+ #### : bug : Bug Fix
19
24
20
- * Change type parameters from ` <V, K> ` to ` <K, V> `
25
+ * Fixed type inference in decorator
21
26
22
27
## v3.50.0 (2021-06-07)
23
28
Original file line number Diff line number Diff line change @@ -227,3 +227,29 @@ cache.clear();
227
227
228
228
console .log (cache .has (' foo1' )); // true
229
229
```
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
+ ```
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Changelog
13
13
14
14
#### :bug : Bug Fix
15
15
16
- * Fixed TS type inferring
16
+ * Fixed type inference
17
17
18
18
#### :boom : Breaking Change
19
19
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ Changelog
15
15
16
16
* Change type parameters from ` <V, K> ` to ` <K, V> `
17
17
18
+ #### :rocket : New Feature
19
+
20
+ * Added a new ` clone ` method
21
+
18
22
## v3.50.0 (2021-06-07)
19
23
20
24
#### :rocket : New Feature
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ Changelog
15
15
16
16
* Change type parameters from ` <V, K> ` to ` <K, V> `
17
17
18
+ #### :rocket : New Feature
19
+
20
+ * Added a new ` clone ` method
21
+
18
22
## v3.xx.x (2021-06-01)
19
23
20
24
#### :rocket : New Feature
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ Changelog
15
15
16
16
* Change type parameters from ` <V, K> ` to ` <K, V> `
17
17
18
+ #### :rocket : New Feature
19
+
20
+ * Added a new ` clone ` method
21
+
18
22
## v3.20.0 (2020-07-05)
19
23
20
24
#### :boom : Breaking Change
You can’t perform that action at this time.
0 commit comments