WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
how to cache JSON (4 posts)

  1. jiyel
    Member
    Posted 2 years ago #

    Hello,

    I'm using wp super cache and the plugin JSON API. I need to cache JSON feed because the Android app for my website access to posts in JSON and it is really slow without caching.

    For example, i need to cache all url beginning with : http://www.mywebsite.com/api/

    How could i do that with wp super cache ?

    Thank you very much for your help. I can give you some money to debbug it if necessary.

    Best

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    The development version of the plugin will help. You need to tell the plugin what closing tag to check for to make sure the page is complete. Use the "wp_cache_eof_tags" filter to add your html tag to it.

  3. jiyel
    Member
    Posted 2 years ago #

    Hello,

    Thank you for you answer. But I don't know how to do it. How can I use "wp_cache_eof_tags" filter" ? Do I have to switch to PHP or legacy caching mode (now I use mod rewrite rules) ?

    Thank you again

  4. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    It's a standard WordPress filter, so look for the string "wp_cache_eof_tags" in wp-cache-phase2.php (I think) and usage should become obvious. Check the codex for docs on how to use filters if you're not familiar with them.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic