graph-gophers / dataloader

Implementation of Facebook's DataLoader in Golang
MIT License
1.2k stars 75 forks source link

data cache + batch timeout #104

Open eaglemoor opened 1 year ago

eaglemoor commented 1 year ago

In this review, I added a few options:

  1. Data cache interface for the ability to wrap the batch function and its positive results in the cache. Now you can use non-memory cache, like redis or sql.
  2. Timeout for batch function. If user close context before batch func done, all data return with error and will be put in cache. WithTimeout help to wrap original context with tracing, variables, but without timeout.
bielcarpi commented 1 month ago

This is an important feature for the library, why has it been abandoned for over a year now?