×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Joomlacomment and XCache

Joomlacomment and XCache 15 years 1 month ago #7132

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hi,

I just installed Joomlacomment. But I have 1 problem. I am using XCache (In Joomla - Global Configuration - System - Cache) with a cache time of 5 minutes. It used to be 30 but I changed it to 5 for testing...
Now comments can only be seen 5 minutes (or 30) after posting them, or when I clean the cache.
Is this right or maybe there is something to prevent this ? I don't want to disable XCache completely.

I am also using JRE Cache, but disabled it completely, wanted to concentrate first on XCache B)

Joomlacomment and XCache 15 years 1 month ago #7133

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
What's XCache? I've never heard of it. Obviously JoomlaComment is incompatible with it, and I would assume most other third-party cache libraries.

EDIT: Oh yeah, xCache - server-side PHP opcode caching, seperate to Joomla but Joomla 1.5 supports it in addition to it's default file cache or as a replacement. Hmm. I guess this will have to become a Wishlist item, but we'll wait for what Daniel has to say.

EDIT2: Maybe Alternative PHP Cache works better, it and XCache are rated the best PHP cache systems, but apparently XCache is better for Joomla. So we'll definately try and make this compatible I think. Let me try and figure out a way how to install XCache on my local Windows+Apache server (if it's even possible).

Joomlacomment and XCache 15 years 1 month ago #7134

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I've done some testing. After posting a comment it doesn't display. I disable XCache, look at the article again and see the comment. I enable XCache again, look at the article again, and the comment is gone. I can even play with the cache time in the global configuration. Depending on the time the comment shows, or not.

If other people are using Alternative PHP cache I can try that also. But initially I installed XCache, because I read it was the best solution for Joomla.

If you need a place to play with XCache I can give you that B)

Joomlacomment and XCache 15 years 1 month ago #7136

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
You'll give me root access to your server OS? I doubt it lol! I can't test this on my live server because I would risk bringing it down along with the other webpages it is hosting, the library isn't even installed. So I have to find a solution for my local Windows testbed server to trial this out, but I don't know when I'll get a chance to.

Stick with xCache, I keep reading that APC is slower and more troublesome with Joomla.

Joomlacomment and XCache 15 years 1 month ago #7137

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I will look at it later this week. I like Joomlacomment and want it to work. I tried several other comment systems already. Also tried things like Intensedebate, but it took about 15 seconds to load the comments.

I think the problem is not with reading while displaying the article and comments. It seems XCache is used for that already. For me it seems something goes wrong when writing the comments to the database. They are written to the databse, but XCache doesn't know about it and gives old information. When writing the comments to the databse, XCache must be notified in some way :-)

These are just my simple thoughts, my programming skills in PHP are at the same level B) But I can always look at it B)

I already found some info about XCache on xcache.lighttpd.net/wiki/XcacheApi

Joomlacomment and XCache 15 years 1 month ago #7138

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Interesting. On compojoom we also use cache, but we don't have that problem

Every comment plugin has a function:
    function cleanComponentCache() {
	$cache =& JFactory::getCache('com_content');
	$cache->clean('com_content');
    }

This function is called right after the component is posted and that is why I think that your comment should show.

Joomlacomment and XCache 15 years 1 month ago #7139

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Do you see the comment immediately after posting? Without refreshing the page?

Does the comment disappear when the page is refreshed?

Joomlacomment and XCache 15 years 1 month ago #7140

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I changed the config and enabled autopublish in Joonlacomment. When I post a comment and press SEND I see the comment immediately.
The link I see in Google Chrome is www.weddingpages.nl/Technology/Space/mor...atis-nunc.html#josc2 (NOTE: #josc2)
When I go back to www.weddingpages.nl/Technology/Space/mor...-venenatis-nunc.html the comment is gone (also after deleting my browser cache).
Then I disable XCache in Joomla, go to www.weddingpages.nl/Technology/Space/mor...-venenatis-nunc.html and the comment shows.
I enable XCache again, go back to www.weddingpages.nl/Technology/Space/mor...-venenatis-nunc.html and the comment is gone again. Till cache expires after x minutes :-)


If needed I can give you the administrator password and link to this site. I am still working on it. The template and data are just a sample.

Joomlacomment and XCache 15 years 1 month ago #7141

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I wanted to use Xcache on compojoom, but when I turned on I was getting some errors (because of the php version), that is why I went for the standard cache with joomla. I guess we should look for the problem further.

Joomlacomment and XCache 15 years 1 month ago #7146

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
I've done some more digging since my last reply, and from what I can see - the problems with XCache are not limited to JoomlaComment alone, but having a Joomla site powered with XCache has it's own assortment of problems that are largely unique to a specific server configuration. The error you said you got Daniel with a wrong PHP version is a great example of that I would guess.

I think we should look towards working on this, but I wouldn't be surprised if we'd need to create a new Joomla Extension to bridge the gap between XCache and Joomla that so many users seem to experience in regards to compatibility. I don't know too much about the library yet, but it'd probably have to be aware of sh404SEF (I have bought the newest version Daniel, FYI) and possibly other Joomla extensions - such as JoomlaComment. Or maybe it's a simple, one-off "patch" extension that's only needed?

Joomla 1.5 is supposed to support XCache natively as the cache engine via global configuration, but I guess changing that setting is still not enough as it breaks various extensions. I thought that, in the case of JC4 still having a lot of J!1.0 code, that it may be a case of legacy commands that are not 100% aware of J!1.5 Caching - but the cleanComponentCache() function you posted Daniel seems right to my eye.

Everything I said there was an educated assumption... I'm still doing my research.

Joomlacomment and XCache 15 years 1 month ago #7148

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I will do some testing. I also have JRE Cache (a page cacher). I will try to see if there is a lot of difference between using XCache with JRE Cache or Joomla built-in cache with JRE Cache.
If the performance is similar than maybe it's easier to just forget about using XCache.

Joomlacomment and XCache 15 years 1 month ago #7150

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
XCache is technically superior, but different to JRE. Technically both should be able to work together. XCache is a PHP opcode cacher - it can internally cache the output of a large function for example, so it doesn't have to run every time it's request. The advantage it has over a simple page cache would increase as the websites' content becomes more complex and dynamic. XCache is an ideal candidate for any CMS, due to the nature of the extension system - i.e., if you have a module that's used on every single page but the CSS styles vary, XCache will still use a shared cache for every page instance that the module runs on. But JRE will have to cache every page independanty, creating a larger and more messy cache. But with that said, JRE is naturally more compatible and in the case of large, static Joomla sites - would be faster - much like any post-process cache engine would be.

If you have a fancy header module on every page of your site, such as GK PhotoSlide, for advertisement or promoting your own website products, XCache is a big big plus. In cases where you have *many* modules that are repeated on *many* pages, it could be quite possible that JRE will infact cause your server to use even more resources :blink: Although very unlikely. It's more likely that, if you have many thousands of hits per minute on your very dynamic, module-rich Joomla site, the speed that JRE provides probably will not be as great as if it was running XCache.

As I said though, it'd be good if they could both work together. XCache is naturally more responsive - it'd cache the output of arrays, functions and other routines in the PHP coding 'behind the scenes' with every 1000 hits for example - then when the PHP renders the output HTML, JRE could cache that with every 500 hits. From memory, that's an optimum way of using two differently targetted cache engines ;)

Sorry if that's too technical, but that's pretty much the reason why i've taken special interest in this. I will definately be looking into XCache more thoroughly.

Joomlacomment and XCache 15 years 1 month ago #7201

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I continued my testing, and decided to disable XCache in Joomla. Joomla itself seems to work fine with XCache. But almost all other things are giving problems.

For example when using JRE Cache, if I disable it it keeps working like I didn't change anything. Same problems with sh404SEF. Changes in configuration don't show on the website. Only after deleting the contents in XCache changes are showing on the website. It makes things difficult to understand and too complicated. I think when making configuration changes in everything not included in the standart Joomla package it's best to first disable XCache. Make the changes in configuration of plugins. Delete contents of XCache and after that enable XCache again.

I am only using JRE Cache now. It seems to me my website is faster using only JRE Cache without XCache. Serverload is also lower. Maybe using XCache gives some overhead, while at the same time it doesn't save much resources when also using JRE Cache. At least on my site... I am only guessing, but I am happy without XCache B)

Want to thank you for your responses. I will install Joomlacomment again. After trying lots of comment systems I still like this one most ;)

Joomlacomment and XCache 15 years 1 month ago #7210

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48

For example when using JRE Cache, if I disable it it keeps working like I didn't change anything. Same problems with sh404SEF. Changes in configuration don't show on the website.

That is the way it is supposed to work. It doesn't change because XCache passes the cached data to the renderer, rather than refreshing with every single hit and rebuilding from scratch. You either need to (a) Clear the cache in XCache to force it to regenerate, or (b) Wait until the next caching 'tick', which is when XCache is configured to refresh the cache after X minutes.

XCache could very well give some overhead, it's possible. Especially if your site is only small - the extra processing power needed to build, maintain and fetch the cache data could outweight the system usage of just generating it fresh every time. However there would definately be a point where a site gets big and complex enough for XCache to actually save resources, and with other non-PHP OpCode cache engines (in my experience) I remember that this performance of the cache will increase exponentially

In other words, the bigger the site is - the more XCache will work and the more resources it will have saved as a result. But if your site isn't already big enough, XCache will slow down the site. That's what I said about JRE Cache I know, but I guess it's the other way around.

Have you tried exploring the advanced configuration for the XCache apache library? It's not one of those things where it's just On or Off, it has a lot of options. See wiki.dreamhost.com/XCache

Joomlacomment and XCache 15 years 1 month ago #7222

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
JonusC wrote:

That is the way it is supposed to work. It doesn't change because XCache passes the cached data to the renderer, rather than refreshing with every single hit and rebuilding from scratch. You either need to (a) Clear the cache in XCache to force it to regenerate, or (b) Wait until the next caching 'tick', which is when XCache is configured to refresh the cache after X minutes.


I understand the idea of XCache. But i think it is wrong that I have to clean the cache myself after changing something in the configuration of a plugin. And it is wrong that comments of Joomlacomment only show after XCache expires after 30 minutes.

For example I am also using vbulletin on 1 of my websites. I once enabled XCache, and forgot about it. Site is faster, for sure. But I never had to clean the cache of XCache. I didn't even know it was possible to do so... When I make changes in my config, I can see changes on the website immediately. When users write a post in the forum, it's shown immediately. Not after 30 minutes when the cache expires B)

Joomla itself with XCache is also allright. When I change something in the configuration of Joomla itself, it works immediately. Problems are with the plugins. Something goes wrong there :S

I looked at the configuration options of XCache. But I see nothing what can help me...

Especially if your site is only small - the extra


I am using www.weddingpages.nl for testing and benchmarks, simulating load and seeing what happens. It has a standart install of the Teline 3 theme with the sample data they included. Site is big, but I think almost everything gets cached by JRE Cache very well. But most of the modules are static, don't change much.

Joomlacomment and XCache 15 years 1 month ago #7223

  • dimitri visser
  • dimitri visser's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I think I will post something about this also in the forums on the Joomla website itself. It's not only Joomlacomment related. It's a problem with almost all Joomla plugins I tried. Other people MUST have the same problem. I hope B)

Joomlacomment and XCache 15 years 1 month ago #7370

  • cedric
  • cedric's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hello,

I've read carefully this post and i don't have Xcache on my website, I've just the default joomla cache system and i think i've got the same problem:

Joomla 1.5.14 and !JoComment 4.0 beta2

Cache Settings:
Cache: Yes
Cache Time 60 Minutes
Cache Handler File

In the plugin System - Cache:
Use Browser Caching: Yes
Cache Lifetime 15 minutes

If an unregistered user leave a comment, he will immediately see is comment (with ajax system i think) but if the page is re-loaded he has to wait until the next refresh of the cache. That's a problem for me because some people will think that the comment was not posted and try to post it again and again...

Don't have this problem with registered users...
But if a registered user want to edit one of his post, he will not see the modifications until the page is re-loaded. That's a problem because he will think that his modifications are not saved....

What do you think about this? :S

PS: on your demo site it's the same think. I've posted as guest and when re-loading the page my comment don't show....

PS2: sorry for my bad english :(

Joomlacomment and XCache 15 years 1 month ago #7374

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hm, interesting. I've never seen this problem, because I always try the comments as registered users. Hm, I will test it and let you know.

Joomlacomment and XCache 15 years 1 month ago #7375

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I've just tested it here on compojoom and it is working fine. On compojoom we have beta2, but on the demo site it is beta1. Do you use beta1 or beta2?

Joomlacomment and XCache 15 years 1 month ago #7380

  • cedric
  • cedric's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I'm using !JoComment 4.0 beta2

What is working fine?

I've turned off comments for unregistered users at the moment...

My principal problem is the ability for the members to immediately see there modifications without refreshing the page. Is it working for you on compojoom with cache enabled?
  • Page:
  • 1
Time to create page: 0.142 seconds