Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Linda A Posted June 20, 2017 Posted June 20, 2017 Up until recently, we used Varnish to cache the forum for guest users. We've shifted to a new server that's quite powerful and are now running Nginx and thought that instead of Varnish perhaps we could use Nginx's caching to save a step. We already have it set up for caching static content, but are there any guides available for setting it up to cache dynamic content and how to make sure those who are logged in can get the dynamic content directly rather than through the cache?
Rhett Posted June 20, 2017 Posted June 20, 2017 Guest caching is already built into our software. You can set this time period in the admincp. So all you really need is an opcache server side. Zend Opcache is my personal choice.
nodle Posted June 20, 2017 Posted June 20, 2017 @Rhett is Opcache fixed yet with the beta 5a, or do we have to wait for 4.2 for the fix?
Rhett Posted June 20, 2017 Posted June 20, 2017 1 minute ago, nodle said: @Rhett is Opcache fixed yet with the beta 5a, or do we have to wait for 4.2 for the fix? What issue are you referring to? if it's the html purifier, that was fixed in the first beta of 4.2, if not please clarify?
nodle Posted June 20, 2017 Posted June 20, 2017 4 minutes ago, Rhett said: What issue are you referring to? if it's the html purifier, that was fixed in the first beta of 4.2, if not please clarify? Yes that is the one, the last I heard it was to be fixed in 4.2, but just wondering if it was fixed in the beta versions. Quote An issue has been identified with PHP 7.1 when using the Zend OPcache extension that may cause features on your site, such as member posting, not to work correctly. If you are experiencing problems posting, please disable the Zend OPcache PHP extension. The underlying issue is related to a third party library used by the Community Suite which has been updated in our upcoming 4.2 release, at which point the OPcache extension may be re-enabled.
Rhett Posted June 20, 2017 Posted June 20, 2017 1 minute ago, nodle said: Yes that is the one, the last I heard it was to be fixed in 4.2, but just wondering if it was fixed in the beta versions. Yes that was fixed with an updated html purifier version, in the first 4.2 version. It only affected a very small handful of people as well, it was not affecting everyone with php 7.1 though.
nodle Posted June 20, 2017 Posted June 20, 2017 3 minutes ago, Rhett said: Yes that was fixed with an updated html purifier version, in the first 4.2 version. It only affected a very small handful of people as well, it was not affecting everyone with php 7.1 though. I think I tried it in beta 5 and still had problems, should I try it again with beta 5a?
Rhett Posted June 20, 2017 Posted June 20, 2017 You shouldn't have any issues, if you do, ensure you are on the latest and please submit a ticket.
nodle Posted June 20, 2017 Posted June 20, 2017 14 minutes ago, Rhett said: You shouldn't have any issues, if you do, ensure you are on the latest and please submit a ticket. I submitted a ticket @Rhett. I just tried it, same thing as originally, maxed cpu to 100%, members can no longer post. Ticket #983420
Linda A Posted June 20, 2017 Author Posted June 20, 2017 @Rhett, Thanks. Just to clarify, guest caching only works with opcaches? Does Redis not work for that sort of caching?
Rhett Posted June 20, 2017 Posted June 20, 2017 14 minutes ago, Linda A said: @Rhett, Thanks. Just to clarify, guest caching only works with opcaches? Does Redis not work for that sort of caching? It works without anything at all, a server side opcache then enhances this by caching php. So a guest will not touch the database (ips) and your php files will be cached via the server side opcache.
Stuart Silvester Posted June 20, 2017 Posted June 20, 2017 59 minutes ago, Linda A said: @Rhett, Thanks. Just to clarify, guest caching only works with opcaches? Does Redis not work for that sort of caching? To avoid hitting MySQL for guest caches, you would need to use Memcache or Redis, otherwise the guest cache will be stored in the database.
Linda A Posted June 20, 2017 Author Posted June 20, 2017 @stuart Thanks. So... have Zend OpCache enabled, have Redis, the ideal setup is then MySQL DB for data storage, Redis for Caching method, and whatever amount of time feels reasonable for caching pages for guests. Apologies if I seem a bit lost on this. I'm just not following how these different caching systems interact (if they do at all).
Stuart Silvester Posted June 20, 2017 Posted June 20, 2017 2 minutes ago, Linda A said: @stuart Thanks. So... have Zend OpCache enabled, have Redis, the ideal setup is then MySQL DB for data storage, Redis for Caching method, and whatever amount of time feels reasonable for caching pages for guests. Apologies if I seem a bit lost on this. I'm just not following how these different caching systems interact (if they do at all). Yes, that would work well. When using Opcache I would still recommend using the filesystem for the data storage method (unless your setup requires it to be set as MySQL). This will instead utilize the Opcache and attempt to avoid making a connection to the MySQL server (which is more efficient)
Linda A Posted June 20, 2017 Author Posted June 20, 2017 Got it. Just a thought, but might it be considered to provide some more clarification regarding file system vs. DB caching on the setup page? Right now it just says that MySQL is generally superior... but it sounds like using File Caching is best if you have an op cache in place. Just to add, I found the help documentation below and it really just doesn't explain what difference there is between Data Storage Method and Caching Method. Do these interact at all? If so, how? If I'm using the file storage system, does Redis even do anything for the forum? And vice versa, if I'm using the DB storage system, does Zend OpCache really do much?
Rhett Posted June 20, 2017 Posted June 20, 2017 1 hour ago, Linda A said: Got it. Just a thought, but might it be considered to provide some more clarification regarding file system vs. DB caching on the setup page? Right now it just says that MySQL is generally superior... but it sounds like using File Caching is best if you have an op cache in place. Just to add, I found the help documentation below and it really just doesn't explain what difference there is between Data Storage Method and Caching Method. Do these interact at all? If so, how? If I'm using the file storage system, does Redis even do anything for the forum? And vice versa, if I'm using the DB storage system, does Zend OpCache really do much? There is no one solution for everyone, every site will be different, based on size, activity, hosting setup and resources, traffic, third party items and on and one. It's best to speak with your systems administrator and review your setup and needs in your specific case. In fact many reading this or trying to mess with caches and such, don't have the size or traffic to even be worrying about it. You do in your case, and should see some great results for a proper setup.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.