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
Anyway you can show me how to use this cache with lazy_static? I'd like to access it from multiple threads. A working example would be amazing! Thank you
The text was updated successfully, but these errors were encountered:
The catch with lazy_static though is that since the references it creates are static they are therefore immutable, so you won't be able to use most of the cache's methods, for example even get, since they manipulate the internal state of the cache. If you don't need to add elements to the cache I think it would be better to just use a Hashmap. On the other hand, if you do need to update the cache after it's created, then you won't be able to use lazy_static but will need to instead initialize during runtime.
Hey!
Anyway you can show me how to use this cache with lazy_static? I'd like to access it from multiple threads. A working example would be amazing! Thank you
The text was updated successfully, but these errors were encountered: