-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from ladda-js/dedup-docs
Dedup docs
- Loading branch information
Showing
6 changed files
with
178 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Deduplication | ||
|
||
Ladda tries to optimize "READ" operations by deduplicating identical | ||
simultaneous requests and therefore reduce the load both on server and | ||
client. | ||
|
||
*Identical* means calling the same function with identical arguments. | ||
<br> | ||
*Simultaneous* means that another call has been made before the first | ||
call has been resolved or rejected. | ||
|
||
Given the following code, where `getUsers` is a "READ" operation: | ||
|
||
```javascript | ||
// Component 1 | ||
api.user.getUsers(); | ||
|
||
// Component 2 | ||
api.user.getUsers(); | ||
|
||
// Component 3 | ||
api.user.getUsers(); | ||
``` | ||
|
||
Ladda will only make a single call to `getUsers` and distribute its | ||
result to all callers. | ||
|
||
|
||
This feature can be disabled on a global, an entity and a function | ||
level. Check the [Configuration Reference](/docs/basics/Configuration.md) for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.