dataloader icon indicating copy to clipboard operation
dataloader copied to clipboard

how to use redis as cache

Open ffrankfeng opened this issue 3 years ago • 1 comments

ffrankfeng avatar Jul 18 '22 13:07 ffrankfeng

U need to support dataloader.Cache interface.

eaglemoor avatar Aug 14 '22 22:08 eaglemoor

Isn't that easy. The cache interface returns a Thunk[V], which is like a "callback function". It is not possible to "encode" and save it on Redis. Based on this answer here, I was expecting it to be possible, but I just realize now that it won't be possible.

Is there a way to refactor the loader to save/load values and not functions?

rwrz avatar Aug 31 '22 21:08 rwrz

@rwrz u can use Redis cache in batch function, without cache in dataloader

eaglemoor avatar Sep 07 '22 22:09 eaglemoor