-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor article fetching with singleflight
- Update logging message to indicate usage of `singleflight Do` instead of `singleflight` - Replace `GetArticleNew` function calls with `GetArticleDo` and add logging for data and request information - Introduce a new `GetArticleDoChan` function with cache hit logging, a timeout mechanism, and simulated data retrieval delay - Add a new loop to demonstrate the usage of `singleflight DoChan` with a wait group and a timeout for each request Signed-off-by: Bo-Yi Wu <[email protected]>
- Loading branch information
Showing
1 changed file
with
44 additions
and
3 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