• $posts = wp_cache_get( 'mycache-recent-photos' );
      if ($posts == false) {
      $posts = get_posts(array(
    			           //"showposts"=>-1,
    			           //"what_to_show"=>"posts",
    			           "post_status"=>"inherit",
    			           "numberposts"=>$rp_settings['rp_number'],
    			           "post_type"=>"attachment",
    			           "post_mime_type"=>"image/jpeg,image/gif,image/jpg,image/png",
    			           "orderby"=>"menu_order ASC, ID ASC"			           ));
    	//Rev 0.0.2 - Adding Random feature
    	//Random feature if it is selected
    	wp_cache_set( 'mycache-recent-photos', $posts,'recent', 3600 ); // save feed content to key "mycache"
      }

    https://www.ads-software.com/extend/plugins/recent-photos/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Recent Photos] Cache a little’ is closed to new replies.