Replies: 1 comment 1 reply
-
it should also accept unit enums, as this is the perfect usecase for this. backed enums are generally for storing data, unit enums not, and even though it is the key that also gets stored, I don't think it is going to be an issue here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When you have a big project with a lot of cached data, failing to consistently use the correct keys when creating and reading data can become a maintenance and debugging nightmare. You might end up duplicating data or, even worse, misspelling a key and getting
null
even when valid data exists.I think it's necessary for the
Cache
facade and its helper functions to accept backed enums to avoid the default behavior, that works pretty well but can be less debuggable.Example:
Beta Was this translation helpful? Give feedback.
All reactions