This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

JSON Cache Plugin

Description

WordPress can be sometimes slow and make a lot of call to the database when you want to display a lot of posts with featured images in on beautifull long scrolling page. I a case like that you need to hit the database to get the featured image of every post.

JSON Cache fix this issue. it allow you to generate a json file that content all the informations of a post so the user when visiting your site just need to open the json file.

Installation

  1. Upload json-cache to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. go to JSON CACHE and click Generate Cached Content (make sure your data folder is writeable)

Getting all posts

$json_cache = new JSONCache();
$jsonposts = $json_cache->getJsonData(‘posts’);

Getting all pages

$json_cache = new JSONCache();
$jsonpages = $json_cache->getJsonData(‘pages’);

Getting a specific post

$json_cache = new JSONCache();
$jsonpost = $json_cache->getJsonData(‘post_1’);

Settings

you can also add a custom image size:
$json_cache = new JSONCache();
$json_cache->add_image_size( ‘thibautdelille-full-width’);

Reviews

There are no reviews for this plugin.

Contributors & Developers

“JSON Cache Plugin” is open source software. The following people have contributed to this plugin.

Contributors

Translate “JSON Cache Plugin” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.1

  • save all pages, all posts and each individuals post in json file
  • retrieve json data in the templates
  • add custom images sizes