Hot answers tagged

5

This may help: Add the following to the general.php 'cacheMethod' => 'redis', 'overridePhpSessionLocation' => 'tcp://localhost:6379' Add the following to the index.php ini_set('session.save_handler', 'redis')


3

@boboldehampsink to the rescue: https://github.com/craftcms/cms/issues/3428 Update: This article covers things really well. https://nystudio107.com/blog/the-case-of-the-missing-php-session php ini config [Session] ; http://www.php.net/manual/en/session.configuration.php#ini.session.save-handler session.save_handler = redis session.save_path = "tcp://127....


3

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 ...


3

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 ...


2

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. https://stackoverflow.com/a/12871072/8520235 Enough RAM and disk caching are always better solutions for reasonable amounts of data. Any local, not to say remote, Redis solution ...


1

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


1

You don't mention if it's Crat 2 or Craft 3, but I'm not seeing anything in either codebase where Craft (or Yii) would limit the amount of memory available in its caching classes.


1

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.


1

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....


1

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 ...


1

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.


1

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible