We’re using Memcached to store Laravel’s cookie-based session at the moment but want to use Redis throughout for session and cache for consistency.
Is there a way to migrate all user sessions from Memcached to Redis without logging out the users?
We’re using Memcached to store Laravel’s cookie-based session at the moment but want to use Redis throughout for session and cache for consistency.
Is there a way to migrate all user sessions from Memcached to Redis without logging out the users?
2
Answers
I was able to migrate the sessions without logging out the users. I created an artisan command for the purpose:
Hope it can help others.
Below just example how to make this kind of migration. Try it that way:
But I guess hat users will be logged out.