XSockets.NET has a built in key/value storage. This storage is a plugin that can be overwritten with a custom module. This section will cover the default module as well as samples on how to add custom modules for storage. This is very handy when you want to persist data that can be accessed from any XSockets server when scaling for example.
A important note about the key/value storage is that is purpose is to store objects per PersistentId. So it stores data for a single user to be accessed later. If you want to store data that should be accessed by many users you should probably implement a normal repository.
As you migth have seen in the
Controllers/Reserved Topics section there is topics reserved to the key/value storage
|s1||StorageSave||Save the key/value passed in into the storage module for the current PersistenId.|
|s2||StorageGet||Get the key/value from the storage module that matches the key sent in for the current PersistenId.|
|s3||StorageRemove||Remove the key/value from the storage module that macthes the key sent in for the current PersistenId.|
|s4||StorageClear||Clear the storge for the current PersistenId.|