You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a key-value pair where key is of type string and value is pointer to a struct. Suppose theres a single struct object.. Can I safely store say three different keys and all their value being pointer to the same single struct.. ?
The text was updated successfully, but these errors were encountered:
Values are stored as-is and changing the mutable value will change all its references. You can store multiple pointers to the same object, but there is no magic in this cache that would prevent you from changing this object elsewhere and then observing this change on value, stored in a cache.
However, if you won't change the object your pointing to in your code, you can safely put it to cache and delete as many of these entries as you want, it still will be available as long as you have at least one pointer to it.
I have a key-value pair where key is of type string and value is pointer to a struct. Suppose theres a single struct object.. Can I safely store say three different keys and all their value being pointer to the same single struct.. ?
The text was updated successfully, but these errors were encountered: