Twelve-factor processes are stateless and share-nothing.
Any data that needs to persist must be stored in a stateful backing service, typically a database.
The twelve-factor app never assumes that anything cached in memory or on disk will be available on a future request or job – with many processes of each type running, chances are high that a future request will be served by a different process.
Even when running only one process, a restart (triggered by code deploy, config change, or the execution environment relocating the process to a different physical location) will usually wipe out all local (e.g., memory and filesystem) state. Cheers!!