Skip to content

Commit cb6bb4f

Browse files
authored
Update readme.md
section move
1 parent 6b60ac5 commit cb6bb4f

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

readme.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,27 @@
66

77
This package offers the rememberMany macro for the Laravel Cache facade, providing efficient retrieval of multiple cache keys with customizable expiration and callbacks for missing keys.
88

9-
---
9+
1010
> The rememberMany macro for the Laravel Cache facade provides several advantages over the traditional method of
1111
> looking up multiple cache keys one by one.
1212
13+
---
14+
15+
### Why?
16+
17+
1. Reduced number of cache lookups: With the traditional method, each cache key is looked up individually, even if some
18+
of them are being retrieved in quick succession. With the rememberMany macro, all the requested keys are retrieved
19+
in a single call to Cache::many(), which can significantly reduce the number of cache lookups and improve
20+
performance.
21+
22+
2. Customizable cache expiration: The rememberMany macro allows you to specify an expiration time for all the cached
23+
values at once, which can simplify the cache management process and make it easier to ensure that your cached data is
24+
up-to-date.
25+
26+
3. Callbacks for missing keys: The rememberMany macro allows you to specify a callback function for each cache key,
27+
which will be called only if the key is not found in the cache. This is similar to the `Cache::remember()` method.
1328

29+
---
1430

1531
### Install
1632

@@ -59,17 +75,3 @@ use Illuminate\Support\Facades\Cache;
5975

6076
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/hareland)
6177

62-
---
63-
### And...?
64-
1. Reduced number of cache lookups: With the traditional method, each cache key is looked up individually, even if some
65-
of them are being retrieved in quick succession. With the rememberMany macro, all the requested keys are retrieved
66-
in a single call to Cache::many(), which can significantly reduce the number of cache lookups and improve
67-
performance.
68-
69-
2. Customizable cache expiration: The rememberMany macro allows you to specify an expiration time for all the cached
70-
values at once, which can simplify the cache management process and make it easier to ensure that your cached data is
71-
up-to-date.
72-
73-
3. Callbacks for missing keys: The rememberMany macro allows you to specify a callback function for each cache key,
74-
which will be called only if the key is not found in the cache. This is similar to the `Cache::remember()` method.
75-

0 commit comments

Comments
 (0)