View Source SuperWorker.TermStorage (SuperWorker v0.0.7)

A wrapper module for storing terms in :persistent_term. Good choice for storing data that is rarely change. Data is can acessed by all processes in the same node.

Key was prefixed with the module name to avoid key collision.

Note: By default, TermStorage will be limited to 1GB of memory. If you need to store more data, you can increase the limit by setting the :persistent_term option in the Erlang VM.

Summary

Functions

Delete the key from the storage.

Get the value of the key from the storage.

Get all key/value in the storage.

Put the value of the key to the storage.

Functions

delete(key)

Delete the key from the storage.

get(key)

Get the value of the key from the storage.

get_all()

Get all key/value in the storage.

put(key, value)

Put the value of the key to the storage.