WordPress.org

Ready to get started?Download WordPress

Forums

How can I use the object cache? (3 posts)

  1. simplemedia
    Member
    Posted 4 years ago #

    Hi all,

    I'm trying to use the WP object cache, but can't figure it out:

    I'm trying to store some information I'm grabbing via an API, so I don't have to hit the API every page load.

    It appears that the capabilities of the built-in cache changed with WordPress 2.5? I've read a few things, but can't figure out where things stand right now:

    http://dougal.gunters.org/blog/2006/07/21/using-the-wordpress-object-cache

    I followed the Codex instructions perfectly I think, I don't get any errors, but it is not caching my information from page load to page load.

    http://codex.wordpress.org/Function_Reference/WP_Cache

    Any help would be appreciated!

    sm

  2. simplemedia
    Member
    Posted 4 years ago #

    To follow up more on this...

    By using the Cache Inspect plugin, I can see some test info that I've thrown into the cache. But I still can't retrieve it successfully...

  3. simplemedia
    Member
    Posted 4 years ago #

    After some more tries, I was able to get the Object Cache to work on my shared hosting account with the plugin linked here:

    http://neosmart.net/blog/2008/file-based-extension-to-the-wordpress-object-cache/

    This blog post helped too:
    http://neosmart.net/blog/2008/wordpress-25-and-the-object-cache/

    The object cache documentation (http://codex.wordpress.org/Function_Reference/WP_Cache) doesn't talk about the changes that were made with 2.5, I still don't totally understand what functionality remains and what got taken out. But this plugin got me up and running.

    thanks!
    sm

Topic Closed

This topic has been closed to new replies.

About this Topic