mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 12:31:52 +03:00
e17e47ef8c
There are two implementations of a Cache, namely a bounded and an unbounded variant. This can be elegantly captured in a type class. In addition to reducing the amount of error-prone code in the definition of the cache, this version reduces the amount of error-prone code in usage sites of the cache, as it makes the cache into an abstract object, so that a calling site cannot distinguish between cache types. Any decision about what should be cached should be made through the interface of a cache, rather than at the callsite, and this is captured by this variant. |
||
---|---|---|
.. | ||
Config.hs |