-
-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can Metadata be controlled? #273
Comments
Good question, Yes the full type name is stored in e.g. Redis along with the key. That might seem redundant but is necessary in some scenarios. You are right that this could go through a resolver of some sort to hand over that responsibility to the user. But that would make the usage way more complicated and maybe even impractical. I'll keep it in mind though, as a optional configuration hint somewhere, maybe? ;) |
Thanks for the fast response! |
Actually, you could write your own serializer. You could role your own and only serialize fields you want and then care about de-/serialization yourself. |
Morning @MichaCo, |
Ok, no, for Redis it is right now fixed to a hash set, that's correct. That's primarily for performance reason. Also, the different operations run lua scripts. Those scripts need access to some of the meta data and that would't work with just a serialized blob. Sure, storing some meta data might use more memory, but it isn't really that much. That's the trade-off for all the other features right now. |
Makes sense. Have you considered the hash-max-ziplist-value setting? Given that you're storing the value object as a single binary value I imagine that in most cases the created HashSet won't be ziplist compatible without increasing the value. |
I've just started evaluating this library and I have a couple of questions:
Is there a way to control the amount of metadata created in a particular store?For caches of small objects the default metadata is quite large, being able to minimise or reduce the metadata if a feature is not used would be useful. For a typed cache is the fully qualified type name needed or could it be inferred from the cache type.
It would be great to be able to register/inject a functor per type for key construction so that the key can be inferred from the type instance rather than having to explicitly provide it.
The text was updated successfully, but these errors were encountered: