Linux 软件免费装

Queue Ajax Calls Performantly

开发者 eddr
secretchord
更新时间 2026年7月16日 23:21
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPL-3.0-or-later

标签

performance ajax queue capi pixelyoursite

下载

1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5

详情介绍:

This plugin offers a way to queue selected Ajax and REST calls, skipping the loading of the the bulk of WP system, saving considerable system resources in the form of CPU load and runtimes. This operation can be set for configured AJAX actions and REST routes. This is done by catching the AJAX calls early in the WP lifecycle, via an MU plugin. The calls are santized ( user should define fields ) and ar stored in a queue for later processing. The queue system is based on Automattic's own Action Scheduler plugin. Processing the calls : the calls are processed in bulk via a hook that is run by CRON. The original motivation for this development was to handle the multitudes AJAX and REST calls that the PixelYourSite evokes when the facebook conversation API is in use. The conversation API requires the server to send the tracking information instead of the client browser. This means possibly lots of calls even if the site is beyond walls of cache. Who is it for At this stage the plugin is a developer level plugin and is intended to be used as such. It requires defining fields for sanitation. However, it comes with a basic implementation for the latest PixelYourSite API calls and can be easily activated without further configuration for most cases. The flow Basic terminogoly Processor : A class/instance that is used to define the data map of fields for sanitation and later on, for batch processing. In many cases, the Processor will be quite simple. Please check the built-in Processor class "class-pys.php" under the "qacp/Processors" directory. Data Map : The map of fields and their respectable sanitation functions. There's an example in the "qacp/qacp-how-to.txt" file. REST route key : A configured REST route prefixed with "rest:", for example "rest:pys-facebook/v1/event". Things to Remember Hooks