In-Memory Tenant

In-Memory Tenant

In order to run your application without any connection to the content of your website, you can enable the in-memory tenant by setting the value of tenant to inMemory (string). This is handy if you are running tests for your code that are reading and writing Scrivito content. In this case, you don’t want the tests to affect the content displayed on your actual website. Furthermore, in most cases, you don’t want the test code to communicate via the network at all.

The in-memory tenant allows exactly that:

  • You can change Scrivito content without the changes being propagated to your production environment.
  • The changes are stored in memory, so making them doesn’t require a network connection.
  • Once the process died, all changed content disappears.

However, there are some limitations when using the in-memory tenant:

  • An in-memory tenant is empty by default, so each time you start a process using the inMemory tenant, your tests would have to set up content first.
  • The search APIs are not available.
  • Everything related to binaries is not available.
  • Everything related to navigation and routing is not available.