Skip to content

Commit

Permalink
修复bug:使用微慕api缓存插件时,采用memcached服务的时候,文章浏览数不更新
Browse files Browse the repository at this point in the history
  • Loading branch information
iamxjb committed Jun 8, 2021
1 parent 0a99460 commit e466454
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions includes/api/ram-wp-rest-posts-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,15 @@ public function get_item( $request ) {
$minapper_cache_type =get_option('minapper_cache_type');
if($minapper_cache_type=='memcached')
{
$cachedata->pageviews=$pageviews;
$data=$cachedata->data;
$data['pageviews']=$pageviews;
$cachedata->data=$data;
}
else{
$cachedata['pageviews']=$pageviews;
}
$response = rest_ensure_response( $cachedata );
return $response;
//$response = rest_ensure_response( $cachedata );
return $cachedata;

}

Expand Down
2 changes: 1 addition & 1 deletion rest-api-to-miniprogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: REST API TO MiniProgram 微慕小程序
Plugin URI: https://www.minapper.com
Description: 为微信小程序、app提供定制化WordPress REST API json 输出.
Version: 4.0.7
Version: 4.0.8
Author: jianbo
Author URI: https://www.minapper.com
License: GPL v3
Expand Down

0 comments on commit e466454

Please sign in to comment.