aiodataloader icon indicating copy to clipboard operation
aiodataloader copied to clipboard

Allow overriding get_cache_key method on subclass

Open dkbarn opened this issue 4 years ago • 0 comments

I prefer to subclass DataLoader and provide an overridden batch_load_fn on the subclass, rather than passing a function into DataLoader's constructor (which feels a little too Javascript-y).

Please could the same functionality be provided for the get_cache_key function? At the moment, there is no way to override this function on a subclass because of the way the function is defaulted inside the constructor.

dkbarn avatar Dec 26 '20 22:12 dkbarn