soulseekah/metabolic 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

soulseekah/metabolic

Composer 安装命令:

composer require soulseekah/metabolic

包简介

A library for locking and mutexes for the WordPress Core

README 文档

README

A WordPress plugin and developer API to optimize post, user, term and comment meta by combining sequential operations into a handful of SQL queries.

Usage

  • Install as a WordPress plugin (mu-plugin) or add it to your project as a composer dependency (composer require soulseekah/metabolic).
  • Call metabolic\defer_meta_updates().
  • Perform a massive amount of meta update operations.
  • Call metabolic\commit_meta_updates().
  • Enjoy reduced database load.

Tips

  • use metabolic\{defer_meta_updates, commit_meta_updates} at the top of your file.

No time to find your hotspots? metabolic\metabolic() will automatically defer (queue) and commit sequential adds, updates and deletes as needed. Boost this up.

API

metabolic\defer_meta_updates( array $args )

metabolic\commit_meta_updates( array $args )

metabolic\flush_meta_updates( array $args )

metabolic\metabolize( bool $activate )

Development

  • composer install --dev
  • git clone --depth=1 git@github.com:WordPress/wordpress-develop.git
  • cd wordpress-develop && npm i && npm run build:dev; cd ..
  • cd wordpress-develop; cp wp-tests-config-sample.php wp-tests-config.php; vim wp-tests-config.php
  • set the test database credentials and :wq then cd ..
  • make sure the database exists
  • vendor/bin/phpunit

TODO

  • Concept
  • Benchmarks
  • Documentation
  • Recipes (common hooks to metabolize)
  • Tests
  • Auto-defer and auto-commit (+ profiler, partial commit short-circuiting)
  • i18n

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-12-12