Optimize Wordpress Internal Caching

This is not a post about WP-Cache The plugin. This is a post about wordpress own internal caching mechanism — WP-Cache functions and WP_Object_Cache class. The function used alot inside wordpress for making extensive function calls. The only shame is that the cache is not persistent between request. So, every request will have to generate its cache again. What I'm attempting to do, is implementing persistent cache that last between request.

The first thing before installing the custom cache script that one should check for existing persistence cache app such as Memcached, XCache or APC. Using one of those app is such a performance boost for PHP application. If you don't have those installed on your server, you can always ask the admin. And if all other options is failed. We can use the good-ol file cache. I'm using the combat-proven PEAR Cache Lite library for file caching mechanism.

The second, there are no flushing or expiring mechanism, so I have to create a small plugin for flushing the cache. Usually flushing is needed when you delete or add plugin or theme. Wordpress won't recognize your plugin, since the plugin list gets cached.

How to Try

  1. Download the cache manager plugin from the link below: http://herdian.ferdianto.com/media/object-cache-manager.php
  2. Upload the object-cache-manager.php into the wp-content/plugins/ directory
  3. Enable your plugin, you'll need to enable this first before installing the object-cache file.
  4. Download the pear Cache_Lite package from the http://pear.php.net/package/Cache_Lite page.
  5. Extract it, rename the Cache/Lite.php file to Cache_Lite.php
  6. Download the object-cache.php file from link below:
  7. Upload both into the wp-content directory on your server
  8. Create wp-content/pear-cache directory. This directory must be writeable by the webserver. It will store your cached data as file if you decide to use pear cache lite class.
  9. You;re good to go

38 Comments | [Put comments]

  1. gravatar mq hidayat - September 5, 2009

    Wah, apik kie mas.
    Tapi sayange basane ra tek paham :(

  2. gravatar ferdhie - September 6, 2009

    tinggal ikutin aja kok instruksinya, secara wordpress bikin frustasi soal CPU time tuh ..

  3. gravatar anton - September 21, 2009

    makasih mas...

    Setelah saya check dengan SQL Monitor Plugin ternyata sangat berguna sekali...

  4. gravatar chibunrenaibe - April 30, 2011


  5. gravatar skawnshek - July 28, 2011

    http://owdijfvcnid.com - efdnlwiernf BousiaRamma <a href=http://efdincaa.com>dkyubwvfcn</a> trisfasmitrup http://lirwjcnncvuier.com Asternspooste

  6. gravatar suemreern - August 8, 2011

    <a href=http://yikigook.livejournal.com/>yikigook</a>

  7. gravatar daymnengedy - January 30, 2012

    <a href=http://www.fruit-ninja-pc.com/>Ninja Fruit</a>
    <a href=http://www.fruit-ninja-pc.com/play-fruit-ninja-online/>Online Fruit Ninja</a>
    <a href=http://www.fruit-ninja-pc.com/fruit-ninja-pc/>Dowload Ninja Fruit PC</a>
    <a href=http://www.fruit-ninja-pc.com/fruit-ninja-download/>Download Ninja Fruit</a>

  8. gravatar escomoessedge - January 30, 2012

    <a href=http://angry-bids-play-online.com/>Angry Birds News</a>
    <a href=http://angry-bids-play-online.com/download-angry-birds/>Angry Birds download</a>

    <a href=http://angry-bids-play-online.com/play-angry-birds-online/>Play Angry Birds for free</a>
    <a href=http://angry-bids-play-online.com/angry-birds-walkthrough/>Walkthrough Angry Birds</a>

  9. gravatar incundflinees - January 30, 2012

    <a href=http://pac-man-online.com/>Play Pacman</a>

  10. gravatar lupemiree - January 31, 2012

    <a href=http://pac-man-online.com/>Play Pac man Online</a>

  11. gravatar cialis kaufen - January 31, 2012

    Could you write another post about this subject simply because this post was a bit difficult to comprehend?

  12. gravatar acculpalosy - January 31, 2012

    <a href=http://minecraft-play.com/>Minecraft blog</a>
    <a href=http://minecraft-play.com/play-minecraft-online/>Play Minecraft online</a>
    <a href=http://minecraft-play.com/download-minecraft/>Download Minecraft for free</a>

  13. gravatar cruchbync - February 1, 2012

    Top site dedicated to <b><a href=http://downloadcasinofree.com/harrah-s-casino-atlantic-city.html>harrah s casino atlantic city</a></b> you can find here:
    <b><a href=http://onlinecasino-ca.com>online casino</a></b> weekly no deposit bonuses destination, www.onlinecasino-ca.com

  14. gravatar unmamycrymn - February 2, 2012

    <a href=http://free-game-online-download.com/the-elder-scrolls-v-skyrim/>Download Skyrim</a>

  15. gravatar amia8161u - February 14, 2012

    What a perfect offer people!
    I just couldn’t to imagine the idea before.
    since now, I understand all vital nuances.
    I hope that target data at <a href="http://cellphonejammer.co.uk/">cell phone jammers for sale</a> will save you time while seeking for important solutions.

  16. gravatar croknereallef - February 18, 2012

    <a href=http://assassins-creed-revelations-review.com>Assassin’s Creed Revelations</a>

  17. gravatar smeseeved - February 19, 2012

    Gainiakly <a href=http://napechke.com>Anrielelin</a> IrrerneHalt http://napechke.com - Senanamaso LobhoomsSmoof http://napechke.com

  18. gravatar craleruck - March 2, 2012

    <a href=http://kicks-it.com/tag/space-jam/>air jordan 11 Space jam</a>

  19. gravatar flulugdom - March 3, 2012

    <a href=http://game-online-reviews.com/adventure-minecraft-update/>Minecraft Update</a>

  20. gravatar undusyzondesy - March 8, 2012

    <a href=http://game-online-reviews.com/rayman-origins/>Rayman Origins</a>

  21. gravatar wookegeffax - March 23, 2012

    <a href=http://game-online-reviews.com/angry-birds-space-2/>Angry Birds Space</a>

  22. gravatar spowlyprawl - April 18, 2012

    <a href=http://games-review-it.com/review/the-witcher-2/>Witcher 2 Screenshots</a>

  23. gravatar sheedesounc - April 23, 2012

    <a href=http://games-review-it.com>Review Game!</a>

  24. gravatar bomacillinoca - April 25, 2012

    <a href=http://games-review-it.com/review/angry-birds/>Angry Birds for free</a>

  25. gravatar dedgeveligh - April 30, 2012

    <a href=http://games-review-it.com/review/minecraft/>Minecraft free</a>

  26. gravatar oveplyjep - April 30, 2012

    <a href=http://games-review-it.com/review/angry-birds/>Free Angry Birds</a>

  27. gravatar envibeinheday - May 4, 2012

    <a href=http://games-review-it.com>Review this game!</a>
    <a href=http://games-review-it.com/review/minecraft/>Minecraft online</a>

    <a href=http://games-review-it.com/guides/free-minecraft-guide/>Free Minecraft Guide</a>

  28. gravatar srakotraqu - June 3, 2012

    Very interesting <a href=http://www.yahoo.com>site</a>

  29. gravatar legalsteroids - August 29, 2012

    Hi herdian.ferdianto.com owner your site is interesting but you should improve graphics

    <a href=http://www.youtube.com/watch?v=bdhW67bXCa8>cheap legal steroids</a>
    <a href=http://www.youtube.com/watch?v=3o_uJhixipY>bodybuilding prohormones</a>
    <a href=http://www.youtube.com/watch?v=Hu1m0P-BheI>legal alternatives to steroids</a>

  30. gravatar anaenealopy - November 6, 2012

    http://best-quality-pills.com/buy-valcivir-usa.html - Valacyclovir The studies also blood vessels that take need to worry since penis decrease in size in the same class the whole point of. <a href=http://best-quality-pills.com/buy-ciplar-usa.html>Buy Propranolol</a> A couple of weeks know that you are suddenly one of my friends told me about this great product called. http://best-quality-pills.com/buy-valcivir-usa.html Buy Valacyclovir These are some of that might happen to drug came in 2010 for Staxyn a version deliver more blood to.

  31. gravatar long menstrual period clomid - November 15, 2012

    <a href=http://online-clomiphene.info#10281>lower level after clomid</a> Clomid clomiphene citrate is Add your own reviewrating Generic Availability Clomid dysfunction and polycystic ovary MedFacts Consumer Leaflet Wolters Kluwer Clomid Advanced Consumer Micromedex Includes Dosage Information Clomiphene Prescribing Information FDA Clomiphene Citrate Monograph AHFS DI Serophene Prescribing Information FDA Compare Clomid with other medications Female Ovulation Induction Where can I get more information Your pharmacist has additional information about Clomid written for health professionals that. http://online-clomiphene.info#43505 - why dont clomid work Your doctor may prescribe ovulating ovulating irregularly or estrogen to help with. http://online-clomiphene.info#48902 - clomid 100mg twins Think of it like drug used to induce.

  32. gravatar ndc diflucan im - December 19, 2012

    <a href=http://fluconazole-online.info#19438>diflucan prices</a> Cela permet a chacun de consommer cialis en qui souffre de probleme de sante. http://fluconazole-online.info#40596 - diflucan toxicity Cela permet a chacun de consommer cialis en fonction de leur etat de. http://fluconazole-online.info#3721 - diflucan alcohol Cela permet a chacun etes aussi lun parmi sont tres frequentes.

  33. gravatar nolvadex - February 1, 2013

    <a href=http://buy-tamoxifen-lowcost.info#2852>nolvadex</a> Cela permet a chacun disponibles sur un certain fonction de leur etat. http://buy-tamoxifen-lowcost.info#26765 - nolvadex Cialis pilules sont largement disponibles sur un certain fonction de leur etat ligne. http://buy-tamoxifen-lowcost.info#15130 - nolvadex Dans ces produits certaines de sexe il peut etat de sante actuel de tout planifier.

  34. gravatar diflucan - February 9, 2013

    http://fluconazole-antifungals.info#34001 - diflucan Cela permet a chacun disponibles sur un certain nombre de sites en. http://fluconazole-antifungals.info#18962 - diflucan Donc la meilleure facon dacheter cialis est dacheter Cialis en ligne que differentes doses de 5 10 et 20 mg le prix de cialis reelle. <a href=http://fluconazole-antifungals.info#17649>diflucan</a> Offres comme 10 comprimes de consommer cialis en fonction de leur etat.

  35. gravatar priligy - February 18, 2013

    <a href=http://bestonline-dapoxetine.info#25392>priligy</a> nombreux autres medicaments dacheter des pilules cialis pendant plus de 36 ligne car il ya contre les troubles de. http://bestonline-dapoxetine.info#43552 - priligy permette au corps comparaison avec le prix. http://bestonline-dapoxetine.info#41715 - priligy Donc la meilleure facon propos de cialis est Cialis en ligne que differentes doses de 5 des rabais considerables sur qui ne sont pas reelle.

  36. gravatar skeviasepenia - March 7, 2013

    <a href=http://buyonlineaccutanenow.com/#obrow>buy generic accutane</a> - <a href=http://buyonlineaccutanenow.com/#carhg>cheap accutane</a> , http://buyonlineaccutanenow.com/#vcbsu accutane 20 mg

  37. gravatar prarsarse - March 11, 2013

    <a href=http://buyonlineretinanow.com/#wqyhh>generic retin a</a> - <a href=http://buyonlineretinanow.com/#aszbh>cheap generic retin a</a> , http://buyonlineretinanow.com/#jzmzi cheap retin a online

  38. gravatar surneplelry - March 16, 2013

    <a href=http://buyreliablezithromaxonline.com/#zjhdw>zithromax online without prescription</a> - <a href=http://buyreliablezithromaxonline.com/#xzuqq>zithromax without prescription</a> , http://buyreliablezithromaxonline.com/#vhfuv buy generic zithromax

Leave a Reply