Small feature for CacheMeIfYouCan - Small Library for Computed Assigns in LiveView
The cb in the @reactive_cache can now accept either one or two arguments. This change is backwards compatible, but I am bumping the version to 0.2.0 because I also moved the type definitions for the reactive_socket and reactive_callback types from the LiveViewCache module to the ReactiveCache struct module. This is technically a breaking change if any callers are using these for typespecs or something since the import paths will change.
The new 2-arity version of the reactive_callback will receive the key from the @reactive_cache config as its second argument, so this can be used to pattern match in the function head for common sets of assigns.
I also finally documented the different keys in the @reactive_cache module attribute, so there is a more complete explanation of how they work instead of only having a couple non-exhaustive code examples that don’t really communicate what the library actually does.






















