hyperoslo / Cache

:package: Nothing but Cache.
Other
2.97k stars 336 forks source link

Allow Storage to use any hashable key #264

Closed nerdsupremacist closed 3 years ago

nerdsupremacist commented 4 years ago

This PR introduces an additional generic parameter Key to all the storage implementations. This enables developers to use any Hashable type as keys...

For a better look at how we can do this, take a look at Hasher+constantAccrossExecutions

Have not gotten around to updating the Changelog or the Readme yet

3lvis commented 3 years ago

Hi @nerdsupremacist! I really like this change, although I believe it's a breaking change. I'll check the tests before merging with master. Thanks for your contribution :)