I have a service with a static trie that is populated in the service constructor. This is an issue as the trie population may attempted more than once as it takes a little while to populate and if it is not finished when another instance of the service is being instantiated errors ensue. What is best practice in this case?
I’ve no idea what this question is asking, please provide a code example that highlights the exact issue.
we need to create a singleton class for in memory caching purposes
is there an example of that in nywhere?