vektah / dataloaden

go generate based DataLoader
MIT License
528 stars 79 forks source link

Adding the ability to change caching strategy #62

Open debugger84 opened 2 years ago

debugger84 commented 2 years ago

It is an attempt to solve the issue https://github.com/vektah/dataloaden/issues/52.

These changes allow developers to disable caching, if necessary, or change the caching strategy to their own realization. For example, everybody can change storing data in the map to storing in BigCache, which has an option to set a limit of memory consumption. In our case, it helps us to avoid storing the whole database in memory.

Also, these changes are fully backward compatible.