This may help:
Add the following to the general.php
'cacheMethod' => 'redis',
'overridePhpSessionLocation' => 'tcp://localhost:6379'
Add the following to the index.php
@boboldehampsink to the rescue: https://github.com/craftcms/cms/issues/3428
This article covers things really well.
php ini config
session.save_handler = redis
session.save_path = "tcp://127....
How many servers do you have?
Redis and Memcached are most beneficial/intended for a multiple server setup so if you only have one server, there's probably other/betters thing to worry about. (Best speed increase I've found so far: PHP 7.)
As Brad points out, it all depends on your content, traffic, concurrent users, etc.
It goes without saying having ...
As with most performance related questions, the answer is "it depends". :)
Apps like Redis and Memcache store their key => value stores in memory as opposed to disk-based file caching.
Accessing data from memory is usually orders of magnitude faster than accessing data from disk.
All of these fall under "General purpose data caching" and Craft will use ...
Here you can find an interesting benchmarking between Redis (remote or local) and Python Disk caching. The answer from Didier Spezia is good enough to understand the results.
Enough RAM and disk caching are always better solutions for reasonable amounts of data.
Any local, not to say remote, Redis solution ...
Luckily, someone else had this problem: https://github.com/craftcms/cms/issues/7617#issuecomment-786715807
The issue was because of leaving the password blank. devMode did not care, but production did. Had to remove the password entirely
Turns out it was a beginners mistake, thank you to Robin in the comments above for setting me on the right track. All that was required to install was the Yii2 library, once this was done all worked as expected.
I seemed to have resolved this issue. Though I am not entirely clear about why the following works, I'll describe what worked for me in case someone else is alos having this issue. If anyone can shed more light on why this may have been causing problems please share.
Our website uses localization and as such we have a separate index.php file for each locale....
I've had issues before where I was getting logged out and could not fathom why: it turned out (after weeks) that when I was using Inspector Tools' Responsive Design mode, Chrome sends different UA strings... which by default causes Craft to log the user out.
It's a long shot; but see if you're only experiencing the issue when you've got your inspector open ...
I can't say for certain if you would see faster session handling if you added the overridePhpSessionLocation config key, but have you added the appId and validationKey configuration keys? I was recently having issues in my load balanced environments because these keys were not set.
Redis and Memcache are both Key value pair storage, their key => value stores in memory as opposed to disk-based file caching that make is faster to access compare with accessing data from disk
Few Interesting properties of Redis:
Redis can be accessed by all the processes of your applications, possibly running on several nodes (something local memory ...