In-memory storage usage in plugin

Hello everyone!
Tell me if there are any caveats to using in-memory storage? as an example for saving maps of black/white lists of ip addresses, for more complex cases of searching in the Radix tree or implementing LRU cache.

That is, I implemented several plugins, writing like a truth Gopher, of course taking into account limitations, but not fully understanding the magic under the hood . These plugins show great results on a local machine in Docker. In the production environment, immediately after loading, all memory is consumed.

Therefore, I want to ask more experienced plugin developers whether it makes sense to use in-memory storage for the examples from the first paragraph?

That is, it is implemented as follows:

  1. the plugin is initialized by filling the map from structures or ordinary strings
  2. map is embedded in the corresponding structures that use it
  3. in case, if the data is not only read, but also written, then I use Mutex

Wow, my problem solved with singleton pattern initialization and storing memory repository in global area for prevent creating each repo for each instance plugin. If anybody have own opinion please tell me about memory usage in plugins. Thnx!