Skip to content

Commit f7af23d

Browse files
authored
Merge pull request #8 from Im-PJ/patch-1
Update cache.md - change forget to clear
2 parents 038aa89 + 273b2f5 commit f7af23d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/docs/6.x/cache.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,18 @@ In the example above, the `get` method will return the value stored in the cache
101101

102102
## Remove Data
103103

104-
To remove an item from the cache, you can use the `forget` method. The method accepts the **key** of the item to remove.
104+
To remove an item from the cache, you can use the `clear` method. The method accepts the **key** of the item to remove.
105105

106106
```dart
107107
import 'package:nylo_framework/nylo_framework.dart';
108108
...
109109
110110
String key = "hello_world"; // Cache key
111111
112-
await cache().forget(key);
112+
await cache().clear(key);
113113
```
114114

115-
In the example above, the `forget` method will remove the item stored in the cache under the key "hello_world".
115+
In the example above, the `clear` method will remove the item stored in the cache under the key "hello_world".
116116

117117
<div id="caching-api-responses"></div>
118118
<br>

0 commit comments

Comments
 (0)