Hi there,
I've been using this great library for some time now, thanks for opening it up to the public!
My use case involves large amounts of data, so I had to change the library slightly to be able to use a bounded cache. I have made it configurable so that each type of request can either use a bounded cache of a given size, or an unbounded cache.
In order to configure it, I have added an additional typeclass that has a DataSource has to be an instance of. It has a single function, cacheSize, that determines the size of the cache for each request (which may be infinite).
If this is useful to other people, I'd be glad to do a pull request. Notice however, that this would be a breaking change, since all DataSources have to add an instance of the new typeclass (which is easy to do).
I have not yet added tests that check that the cache stays within the specified bounds, nor done benchmarks (but it's on my agenda).
Best,
Philipp
Hi there,
I've been using this great library for some time now, thanks for opening it up to the public!
My use case involves large amounts of data, so I had to change the library slightly to be able to use a bounded cache. I have made it configurable so that each type of request can either use a bounded cache of a given size, or an unbounded cache.
In order to configure it, I have added an additional typeclass that has a DataSource has to be an instance of. It has a single function, cacheSize, that determines the size of the cache for each request (which may be infinite).
If this is useful to other people, I'd be glad to do a pull request. Notice however, that this would be a breaking change, since all DataSources have to add an instance of the new typeclass (which is easy to do).
I have not yet added tests that check that the cache stays within the specified bounds, nor done benchmarks (but it's on my agenda).
Best,
Philipp