Page Caching
I’ve made some minor changes to the blog over the last few days. Firstly, I’ve been using Ricardo Galli’s WP-Cache 2.0 plugin. This is an efficient WordPress page caching system. It should make the site much faster and responsive. WP-Cache started life as the “Staticize Reloaded” by matt and billzeller. I like the fact that it automatically invalidates the appropriate cache files when you publish a post or page or comment.
It also allows you to have portions of you page remain dynamic. This is fantastic. I needed my page counter to remain dynamic in order to be accurate.
Random Gallery Image
Someone kindly pointed out that clicking on the random Gallery image in the side bar was opening up the gallery in the tiny little iframe still in the sidebar. Not very useful that. I remembered that I could include the random image directly in the sidebar, but that the code wasn’t XHTML compatible. With the caching plugin it would also mean that the image would stop being random.
For my second tweak I ended up having to do a couple of things. One was to hack the Gallery code to produce valid XHTML. Unfortunately the dynamic part of the caching code which allows you to include a php file assumes that it needs to prepend ABSPATH to the include. That’s not the case for the random gallery image. So the last task was to tweak the dynamic part of the caching plugin so that I could include my gallery random image code from an http url.
Update 21/07/2005: I’ve submitted a trac ticket with a patch against the latest revision to implement this.
Speed up
I hope these changes help the site to run faster. It had been slowing down again. This was due to too many externally generated content in the sidebars. This is all cached now so things should be much quicker.
Short link to this post: https://z1.tl/om
Do you mean you have modified the actual plugin? Cos I would like the same thing too and would be really glad if you could help me out with that.
TIA
AJ,
Yeah I had to modify the plugin code. I’ll probably submit a patch to the repository.
Mike
AJ,
I’ve now submitted a trac ticket with a patch against the latest revision to implement this.
It should be easy to apply yourself against the latest revision or else wait for Ricardo to update the plugin.
Pingback: kloeschen.com >>
Hi Mike – we are using your sand template on our site… just implemented it the other day and have several tweaks (colors) to get what we want.. a work in progress.
Anyway, I would like to add the gallery program you are using, to our site also. Reading this post made me wonder if it’s a difficult thing to add? It sounds like maybe it doesn’t work correctly “right out of the box”?
Hi Judi
I only had particular problems because I am using a caching plugin which meant I needed to tweak.
If you get the gallery software installed, its pretty easy to get the random picture in your sidebar. Let me know if you need any help.
Mike