Title: [Plugin: JSON API] w3 total cache &amp; json api
Last modified: August 20, 2016

---

# [Plugin: JSON API] w3 total cache & json api

 *  [skhfw](https://wordpress.org/support/users/skhfw/)
 * (@skhfw)
 * [14 years ago](https://wordpress.org/support/topic/plugin-json-api-w3-total-cache-json-api/)
 * is there a way to cache anything that is behind lets say the folder /api/
 * caching plugin is w3 total cache
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [sf_mike](https://wordpress.org/support/users/sf_mike/)
 * (@sf_mike)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-json-api-w3-total-cache-json-api/#post-2777786)
 * Did you get an answer on this? CDN url rewriting rules in w3 total cache are 
   ignored by the json api as well. I’d love to see them working together nicely.
 *  [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-json-api-w3-total-cache-json-api/#post-2777812)
 * Not by default in the plugin. The plugin only caches xml/html based pages. To
   support JSON data one needs to add and write a check for that in PageCache ob_callback.
   The use case has been noted however.
 *  [alexanderjohansson](https://wordpress.org/support/users/alexanderjohansson/)
 * (@alexanderjohansson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-json-api-w3-total-cache-json-api/#post-2777813)
 * I solved this, although it’s not a perfect solution, but it works for now
 * I replaced `if ($buffer != '' && w3_is_xml($buffer))` in `PgCache.php` with
    
   if `($buffer != '' && (w3_is_xml($buffer) || w3_is_json($buffer) || w3_is_jsonp(
   $buffer)))`
 * The w3_is_json-stuff looks like this at the moment: [https://gist.github.com/3349372](https://gist.github.com/3349372)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: JSON API] w3 total cache & json api’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [alexanderjohansson](https://wordpress.org/support/users/alexanderjohansson/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-json-api-w3-total-cache-json-api/#post-2777813)
 * Status: not resolved