Linux 软件免费装
Banner图

Redis Post Views

开发者 razvanstanga
更新时间 2018年7月27日 14:32
捐献地址: 去捐款
PHP版本: 5.2.4 及以上
WordPress版本: 4.9
版权: GPLv2 or later

标签

caching cache performance traffic optimization redis postviews

下载

1.7

详情介绍:

Imagine a high traffic website that needs post views as an algorithm to display posts on the homepage. This website also uses Varnish Caching. So we need an AJAX based post views counter. Now imagine a minimum 5000 concurrent users browsing the website, so we can't use the default "AJAX in Plugins" as live updates on the backend using update_post_meta will be very painful for the backend. So what can we do ? What if all these post views counts will be done in memory using Redis ? Then we run a cornjob using WP-CLI to sync the post views count in Redis to the Wordpress database. Redis Post Views was born.

安装:

屏幕截图:

  • Statistics admin panel
  • Posts queue admin panel
  • Configuration info admin panel

常见问题:

How can I display the post views in a template?

You can do this with get_post_meta(get_the_ID(), RPV_POST_META_KEY, true); php function

更新日志:

1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0