[wp-hackers] Caching in 2.5: anyone has a file-based caching plugin?

Stephane Daury wordpress at tekartist.org
Sun Mar 23 05:39:39 GMT 2008


On Mar 22, 2008, at 18:00, Mahmoud Al-Qudsi wrote:

>> <http://neosmart.net/blog/2008/wordpress-25-and-the-object-cache/>
>>
>> [snip]
>
> This should do the trick:
> http://neosmart.net/downloads/software/WordPress/Plugins/object-cache/file-object-cache_1.0.zip
>
> Just extract it to /wp-content/object-cache.php and you should be  
> good to go. Let me know if it gets the job done and I'll publish it  
> in a more "official" manner. (since it resides in wp-content it's a  
> plugin... it just doesn't show up in the admin center's plugin page  
> though).
>
> I'm willing to take up the maintenance of the file-based caching  
> along with NST's existing WP plugins for XCache and eAccelerator; as  
> you point out, it can be pretty important :)
>
> Cheers!
>
> -MQ

This seems to work wonder Mamhoud. Big thanks!!

On this note, do the caching object and plugins still make use of the  
ENABLE_CACHE constant in wp-config.php.
In other words, is checking if the latter is set to true (and as the  
codex page states, that DISABLE_CACHE isn't set either) to know if  
caching is available?
Or can I just check if the caching functions exist (version handling)  
and they'll just fail gracefully (return false) if cache isn't enabled?
What's the best practice?

Viper: The plugin I'm writing is interacting with an external xml/json  
api, so caching greatly enhance the performance regardless of if it's  
file or mem based, since it limits the remote connections.

Again, big thanks. I'm sure this will be useful to some.

Stephane


More information about the wp-hackers mailing list