By HMED on Monday, 08 March 2021
Replies 26
Likes 0
Views 1.9K
Votes 0
hello,

Actually i dont use cache for my website, i'd tried long time before to use it but got lot of bugs (some users found their selves logged with another users accounts!).

I have some cache engines (memcached, redis) that i can use, whay i should use as option (conservative, professive ...) especially with logged in users ?
I do not see the purpose of a caching if you are building a social network site. Your social network / forums are being updated by the seconds / minutes / hour and instead, I personally feel that caching will only cause performance overhead.

Why?

1. First you need to understand the mechanism of caching. A cache mechanism will run as many queries / heavy actions on it's initial load so that subsequently, your server is not queried again.

2. On a social network, people are posting by the seconds, minutes, or hour. This means that your cache is pretty much useless as it needs to re-run all its initial queries again as it needs to refresh its cache database. This eventually means every time a user posts something new, the site needs to be refreshed (cache needs to be cleared) and you repeat step #1 all over again.
·
Monday, 08 March 2021 21:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

i understand, then you advice SI extensions users (ED, EB, ES) to not use cache as their content is being changing regulary ?
I activated it many time and changed many options and difference in performance is not huge.
·
Tuesday, 09 March 2021 17:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Apparently LightSpeed improves the loading speed of EasySocial. Available on some hosts. PlanetHoster in particular.
https://stackideas.com/forums/performance-measurement-defer-javascript#reply-535790

Philippe
·
Tuesday, 09 March 2021 17:14
·
0 Likes
·
0 Votes
·
0 Comments
·
You can use cache mechanism but only if you fine tune it for exact needs so you need to do a lot of tests.

And easiest way is to exlude all cache that have to do with EasySocial.

I use Joomla JotCache ( use Jotcache "Load module" instead of Joomla std) with Adaptive Images Pro https://extensions.joomla.org/extension/xt-adaptive-images-pro/ that also doing WebP images on the fly and it working fine.

I dont have memecache but APC cache working fine with Joomla conservative caching on with this combination. And I also using a finetune ServerCache exluding EasySocial https://www.web-expert.gr/en/joomla-extensions/item/127-nginx-server-cache-joomla

These are tested by me and have a great impact on performance of your site.
·
Tuesday, 09 March 2021 17:29
·
0 Likes
·
0 Votes
·
0 Comments
·
You can cache but you need to selectively cache pages / modules / sections that you know will be static. For instance, once you have completed setting up your plans on PayPlans, you know for sure the plans page would never change. Therefore caching the contents on this page makes perfect sense.

Other examples where caching makes sense:

1. When you have language translations module that will always be static. Then, caching it makes perfect sense.

2. When you have a recent blog post that is probably only updated weekly / monthly.

3. When you have menus that don't always change


Examples where caching does not make any sense:

1. If you have a clock module that displays the current time, caching it makes no sense at all.

2. Points module where you may earn points by the hour, minute or second.

3. Activity stream, unless your site is pretty dormant and do not have much activities
·
Tuesday, 09 March 2021 17:38
·
0 Likes
·
0 Votes
·
0 Comments
·
You can use cache mechanism but only if you fine tune it for exact needs so you need to do a lot of tests.

And easiest way is to exlude all cache that have to do with EasySocial.

I use Joomla JotCache ( use Jotcache "Load module" instead of Joomla std) with Adaptive Images Pro https://extensions.joomla.org/extension/xt-adaptive-images-pro/ that also doing WebP images on the fly and it working fine.

I dont have memecache but APC cache working fine with Joomla conservative caching on with this combination. And I also using a finetune ServerCache exluding EasySocial https://www.web-expert.gr/en/joomla-extensions/item/127-nginx-server-cache-joomla

These are tested by me and have a great impact on performance of your site.


Thanks a lot !
just installed the NGINX plugin, seems that the plugin exlude logged in users, do i need to add other exceptions in this plugin or i let it all default option ? i use ES+ED+EB+Jreviews.

And for joomla cache option, what i should set ? conservative ? progressive ? Files ?
·
Tuesday, 09 March 2021 17:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Use conservative caching https://docs.joomla.org/Cache
·
Tuesday, 09 March 2021 17:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Use conservative caching https://docs.joomla.org/Cache


Thanks for the input, i ll use this then !
"Files" mechanism is related to opcache / nginx true ?
·
Tuesday, 09 March 2021 17:58
·
0 Likes
·
0 Votes
·
0 Comments
·
"Files" mechanism if you talking about Joomla cache settings is what kind of cache you should use. Joomla std file cache or if your server have memcache, OP cache, Redis etc. Most shared webhosting have not memcache db storage caching so you can go with FIle or OP caching should work fine.
·
Tuesday, 09 March 2021 18:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you.

I can see now some changes, as logged user the website load normally, when i log off the website load faster, i think its due to the nginx server plugin !
·
Tuesday, 09 March 2021 19:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Test this also "I use Joomla JotCache ( use Jotcache "Load module" instead of Joomla std) with Adaptive Images Pro https://extensions.joomla.org/extension/xt-adaptive-images-pro/ that also doing WebP images on the fly and it working fine. "

Free dl Jotcache 6.2.1 http://www.jotcomponents.net/home/web-programming/jotcache/download/actual-versions-group

Help: http://www.jotcomponents.net/home/web-programming/jotcache/jotcache-help/148-jotcache-ver-6-x-help

That will be very good for your performance
·
Tuesday, 09 March 2021 19:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing ssnobben. I did not even know of this!
·
Tuesday, 09 March 2021 23:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for all those tips!!!
can we use both jotcache and the other plugin related to Nginx ?

By the way, did you get some alerts from your users get connected with another users account ? i got this and thought my website is being hacked, it was due to sessions cache.
·
Tuesday, 09 March 2021 23:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Moving this to a non supported category.
·
Wednesday, 10 March 2021 10:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Hmed

I have issue on my Es site with users logging in and seeing other users conversations or profile, could the cache be the issue I wonder, did you turn your cache off in global settings etc?

Actually i dont use cache for my website, i'd tried long time before to use it but got lot of bugs (some users found their selves logged with another users accounts!).


Kind Regards
Rob
·
Wednesday, 10 March 2021 17:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Hmed

I have issue on my Es site with users logging in and seeing other users conversations or profile, could the cache be the issue I wonder,


Yes I guess this is a ES cachen handeling issue with Joomla std cache and should be fixed by Stackideas so better create a ticket so this could be improved instead for ES 4.
·
Wednesday, 10 March 2021 17:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ssnobben

Thanks for your reply, I have a ticket with support for this issue and hopefully the guys can find the issue on my site.
Would you turn off cache in global settings etc for now?

Kind Regards
Rob
·
Wednesday, 10 March 2021 17:23
·
0 Likes
·
0 Votes
·
0 Comments
·
This is not an issue with our extensions. If you have an extensive cache engine in place, there is nothing we can do. The "plugins or modules" should never dictate when it should be purging the cache.
·
Wednesday, 10 March 2021 17:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark

Thanks for your reply, I only have the inbuilt cache system running on my site, I just read the first post by Hmed and wondered if that what was causing my problem on my site.

Kind Regards
Rob
·
Wednesday, 10 March 2021 17:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Hmed

By the way, did you get some alerts from your users get connected with another users account ? i got this and thought my website is being hacked, it was due to sessions cache.


How did you turn off sessions cache?

Kind Regards
Rob
·
Wednesday, 10 March 2021 17:37
·
0 Likes
·
0 Votes
·
0 Comments
·
This is not an issue with our extensions. If you have an extensive cache engine in place, there is nothing we can do. The "plugins or modules" should never dictate when it should be purging the cache.


We would would like have an official guide on this for best practice when cache is enabled, examples :

> use concervative Cache,
> Exclude from caching : ED urls, ES pages, EB .. Komento etc. With the XX or YY extension (jot cache etc.)
> Exclude from caching connexion pages ..
> Add periodic cache clearing rules per extension with estimation (daily for blog posts, every hour for discussion, disabled completly for activities ..)
·
Wednesday, 10 March 2021 17:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Hmed

By the way, did you get some alerts from your users get connected with another users account ? i got this and thought my website is being hacked, it was due to sessions cache.


How did you turn off sessions cache?

Kind Regards
Rob


Its possible with 3rd extensions like jot cache as mentionned by Ssnobben :
https://stackideas.com/forums/best-joomla-caching-parameters-for-a-community-website#reply-536443
·
Wednesday, 10 March 2021 17:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Hmed

Thanks for your reply, would just turning off cache in global settings work or would site performance and db be impacted?
Like Mark said he don't see much point to cache on a social network

I do not see the purpose of a caching if you are building a social network site. Your social network / forums are being updated by the seconds / minutes / hour and instead, I personally feel that caching will only cause performance overhead.


Ive turned off cache in global config for now and will monitor it

Kind Regards
Rob
·
Wednesday, 10 March 2021 18:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for all those tips!!!
can we use both jotcache and the other plugin related to Nginx ?

By the way, did you get some alerts from your users get connected with another users account ? i got this and thought my website is being hacked, it was due to sessions cache.


I've been using Jotcache for K2 for a long time. A great component.
During experiments with Easysocial, I found a problem with the token.
Alert:
"The page has been reloaded due to invalid token. Please try again."

It is possible that users are encountering this message. Since the same token is cached for all users. Does this pose a risk to the system... hmm... I'm not sure. Is the token so important for an unregistered user? But it seems that there were cases when the data entered in the login form was cached along with the login page, because the entire page is cached completely.

Here's the problem with Jotcache and Easysocial compatibility:

1. There are album pages, with lots of photos. This is something that can definitely be cached.
2. In Jotcache, I enable settings only for Albums.
3. User-1 comes in, the page is cached, user1 presses the "Load more photos" button. Everything works, everything is fine.
4. User-2 comes in, receives a message "The page has been reloaded due to invalid token. Please try again."
and the "Load more photos" button doesn't work anymore.

I tried to disable the token for non-logged-in users, but without the token, the "Load more photos" button does not work at all. Although why need a token for an unregistered user is a big question. And why need a token for the Loadmore button...

In general, caching helps a lot, especially on large album-type pages. For a dashboard, it probably isn't necessary, and the information is updated more often and works faster.

The video pages seem to work well with Jotcache, that is, where there is no need to interact with the system using a token, a Loadmore button, or uploading a stream to the dashboard for non-logged-in users, everything works. The login and registration pages must be excluded from caching in the settings.
·
Saturday, 13 March 2021 02:29
·
0 Likes
·
0 Votes
·
0 Comments
·
We have always used the default Joomla File caching, together with GZip compression.
In the background we have PHP OPCache, which is now default with PHP 7.

It was mentioned that there is no need for caching when running a social community website. That's not strictly true, unless you have no static content at all. In our context, caching is great for public access pages, such as marketing pages, which many people include as part of their community. Pages such as your privacy policy, AUP, subscription pricing, FAQ's etc can benefit greatly from caching.

Joomla caching works great on these "public" pages.
Private pages (registered users, special users etc) are not cached, so you don't need to worry about user data being cached EXCEPT if you cache the login module on public pages.
(There are few others too but this is the main culprit. Disable caching using the module advanced tab.)

Enabling cache for dynamic content (such as Easysocial), caching is not gonna give you blindingly fast performance or boost speed significantly. If you are looking for every millisecond of speed, then JotCache etc can be used.
This gives you more granular control over caching, but you need to have the time to spend setting it up properly (its a lot of trial and error) . Not for novices either.

If you don't have the time to spend tweaking and fine-tuning, then just use the normal Joomla cache options. and disiable caching on any module that saves a session/cookie (login module is the most common, but who is online is another one)

Oh...and don't ever, ever, ever enable "System - Page Cache" when using dynamic content such as EasySocial.
·
Wednesday, 28 July 2021 20:32
·
0 Likes
·
0 Votes
·
0 Comments
·
And have at least 2 GB memory for your hosting
·
Thursday, 29 July 2021 21:56
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post