The database in my PHP Yii2 framework based web application is encrypted and I will be generating the encryption key based off the user password. Is there a secure way to store this in the memory so that it can be used when required?
I believe saving it as a sessions variable will get it written to the disk and perhaps I may want to avoid that.