Site updates

Page Cach­ing

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 plu­gin. This is an effi­cient WordPress page cach­ing sys­tem. It should make the site much faster and respons­ive. WP-Cache star­ted life as the “Stat­icize Reloaded” by matt and billzeller. I like the fact that it auto­mat­ic­ally inval­id­ates the appro­pri­ate cache files when you pub­lish a post or page or comment.

It also allows you to have por­tions of you page remain dynamic. This is fant­astic. I needed my page counter to remain dynamic in order to be accurate.

Ran­dom Gal­lery Image

Someone kindly poin­ted out that click­ing on the ran­dom Gal­lery image in the side bar was open­ing up the gal­lery in the tiny little iframe still in the side­bar. Not very use­ful that. I remembered that I could include the ran­dom image dir­ectly in the side­bar, but that the code wasn’t XHTML com­pat­ible. With the cach­ing plu­gin it would also mean that the image would stop being random.

For my second tweak I ended up hav­ing to do a couple of things. One was to hack the Gal­lery code to pro­duce valid XHTML. Unfor­tu­nately the dynamic part of the cach­ing code which allows you to include a php file assumes that it needs to pre­pend ABSPATH to the include. That’s not the case for the ran­dom gal­lery image. So the last task was to tweak the dynamic part of the cach­ing plu­gin so that I could include my gal­lery ran­dom image code from an http url.

Update 21/07/2005: I’ve sub­mit­ted a trac ticket with a patch against the latest revi­sion to imple­ment this.

Speed up

I hope these changes help the site to run faster. It had been slow­ing down again. This was due to too many extern­ally gen­er­ated con­tent in the side­bars. This is all cached now so things should be much quicker.

6 thoughts on “Site updates

  1. Do you mean you have mod­i­fied the actual plu­gin? Cos I would like the same thing too and would be really glad if you could help me out with that.

    TIA

  2. AJ,
    I’ve now sub­mit­ted a trac ticket with a patch against the latest revi­sion to imple­ment this.

    It should be easy to apply your­self against the latest revi­sion or else wait for Ricardo to update the plugin.

  3. Pingback: kloeschen.com >>

  4. Hi Mike — we are using your sand tem­plate on our site… just imple­men­ted it the other day and have sev­eral tweaks (col­ors) to get what we want.. a work in progress.

    Any­way, I would like to add the gal­lery pro­gram you are using, to our site also. Read­ing this post made me won­der if it’s a dif­fi­cult thing to add? It sounds like maybe it doesn’t work cor­rectly “right out of the box”?

  5. Hi Judi
    I only had par­tic­u­lar prob­lems because I am using a cach­ing plu­gin which meant I needed to tweak.
    If you get the gal­lery soft­ware installed, its pretty easy to get the ran­dom pic­ture in your side­bar. Let me know if you need any help.

    Mike

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>