New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose cacheKeyFn #76
Comments
Interesting idea |
@Janpot Why don't you define and pass a |
@caub I'm not sure I understand. My pattern is wrapping a dataloader, that might be obtained from anywhere, whose creation you might not be in control of. Could you show some pseudocode to illustrate your pattern? |
@Janpot ah I see, ideally you should have the cache along the wrapper loader |
I'm going to close this aging issue. Looking back on this, this makes an assumption that a local cache key mapping function is recyclable as a redis key function, and while that may be true for this particular app, it's probably not generally useful to warrant expanding the public API. Otherwise, I don't see a huge problem with touching private API if it works for you and you're not afraid of checking behavioral changes when upgrading (write tests!) However note that to support the next release your code will need to adjust because of #226. The change should make your code closer to what you originally hoped to write. |
Working on a pattern where I wrap one dataloader with another. It would be useful to have the
cacheKeyFn
exposed on the dataloader instance so I can use it for inner cache key generation and pass it through to inner dataloaders.Example:
I now do
but I prefer a public getter
The text was updated successfully, but these errors were encountered: