[wp-hackers] compression and caching

Jacob Santos wordpress at santosj.name
Sun Dec 27 20:03:43 UTC 2009


The problem with what you propose is putting a solution where it does 
not belong and increases the overhead overall. The server solutions, 
while not available to everyone are better. With caching and compression 
there are many solutions, some better than others and no one solution 
will rule all for everyone. It is the reason there are plugins that 
handle this. Not everyone can dig into Apache and command it, so plugins 
are great for dealing with those people.

More below:

>> There are Many *good* caching plugins for WordPress, But none of them 
>> can deal with a often changing Dynamic website AFAIK,
>
> I'm not sure I follow.

When you cache a dynamic web site, lets say you have randomized ads. As 
soon as you cache the location of the ads, the placement is set until 
the cached page expires and is regenerated and thus regenerates the 
page. Now, we can talk about all kinds of caching that deals with this, 
but I believe we are talking about HTML page caching which does not 
(JavaScript loading in those dynamic regions is a workaround for this).

I mean this just furthers the point that caching isn't just as simple as 
flipping a switch and when you include one kind of caching, you 
eventually will have to include the rest. When you add this to core, 
then well, while it would be better than some image editing feature or 
another bloating feature, it will still require maintenance and the 
people willing to extend and maintain all of the different gotchas that 
come up. The problem in WordPress could have been fixed many different 
ways, but after being "Fixed" so many times, I think the decision to 
remove it was a good one.

>> And none of them belong  in core in my opinion as they're better 
>> suited to running as plugins.
>
> I agree that there are a lot of good caching plugins but the fact that 
> caching is enabled only through plugins goes against speeding things 
> up even if in practice it is a small effect. 

You either didn't fully explain your position and aren't giving an 
accurate and full account of what you are talking about or you don't 
know what you are talking about or think you do and don't. Let me 
educate you.

There are many solutions for caching: Database SQL caching, variable 
caching (APC, Xcache, Memcache, etc), partial HTML caching, full HTML 
caching, Apache Caching, PHP opcode caching, PHP caching (through 
extension), and probably a few more.

It only takes three to six lines in the MySQL my.cnf file to increase 
the default SQL caching (on dedicated or virtual dedicated with a lot of 
memory) to increase SQL caching. Since most of the time it is the 
database that has the most overhead in a PHP script, increasing this 
will go further than anything done in PHP. For other sites that get even 
more traffic PHP opcode caching should be used and for those that have 
it and for code that can't be optimized or takes a long time regardless, 
PHP variable caching or memcaching is better.

Just turning on full HTML caching will screw those with NFS filesystems 
and those with highly dynamic elements on their web sites.

Jacob Santos


More information about the wp-hackers mailing list