前言介紹
- 這款 WordPress 外掛「Queue Ajax Calls Performantly」是 2025-04-06 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2025-04-07,距離現在已有 26 天。
- 外掛最低要求 WordPress 5.8 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
eddr | secretchord |
外掛標籤
ajax | CAPI | queue | performance | pixelyoursite |
內容簡介
總結:這個外掛提供了一種將 Ajax 呼叫排入隊列的方式,可以跳過 WP 系統載入的大部分,節省系統資源如CPU負載和執行時間。這個操作可以應用到任何 Ajax 呼叫。這是透過一個 MU 外掛在 WP 周期早期捕捉 Ajax 呼叫完成的,這些呼叫經過消毒(使用者需要定義欄位),並存儲在隊列中以便以後處理。隊列系統基於 Automattic 自己的 Action Scheduler 外掛。
問題與答案:
1. 這個外掛的主要功能是什麼?
- 提供了一種將 Ajax 呼叫排入隊列的方式,可以跳過 WP 系統載入的大部分,節省系統資源如CPU負載和執行時間。
2. 這外掛的操作流程是什麼?
- 透過一個 MU 外掛在 WP 周期早期捕捉 Ajax 呼叫完成的,並對其進行消毒,然後存儲在DB中以便批量處理,最後通過 CRON 接口批量處理這些呼叫。
3. 這外掛適合哪些使用者?
- 此外掛目前僅針對開發人員級別設計,需要定義消毒字段,但對於大多數情況,可使用基本實現最新 PixelYourSite API 呼叫的功能。
這些問題與答案可以用以下 HTML 編碼的無序列表呈現:
- 這個外掛的主要功能是什麼?
- 提供了一種將 Ajax 呼叫排入隊列的方式,可以跳過 WP 系統載入的大部分,節省系統資源如CPU負載和執行時間。
- 這外掛的操作流程是什麼?
- 透過一個 MU 外掛在 WP 周期早期捕捉 Ajax 呼叫完成的,並對其進行消毒,然後存儲在DB中以便批量處理,最後通過 CRON 接口批量處理這些呼叫。
- 這外掛適合哪些使用者?
- 此外掛目前僅針對開發人員級別設計,需要定義消毒字段,但對於大多數情況,可使用基本實現最新 PixelYourSite API 呼叫的功能。
原文外掛簡介
This plugin offers a way to queue Ajax 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 any AJAX call.
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 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
AJAX call evoked in the client browser ->
MU plugin catches the call if the configuration includes the specific action of the call ->
Processor ( built-in or user defined ) checks the data and sanitizes it ->
Data is stored in DB to be handled in queue. The data includes the call’s data and cookies ->
Data is processed in batch via a CRON hook. The processing is done via the same “Processor”.
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.
Things to Remember
The Processor should define clearly what are the received fields and their sanitation functions.
The action and processor should be registerd. There’s an example in the “qacp/qacp-how-to.txt” file.
Hooks
qacp/processors/active_processors
qacp/processors/actions
qacp/processors/identify_processor
qacp/processors/instance_by_action_name
qacp_before_batch_processing
qacp_before_process_entry_{$_action_name}
qacp_before_process_entry
qacp_process_one_entry_{$_action_name}
qacp_process_one_entry
qacp_mark_event_finished
qacp_after_process_entry_{$_action_name
qacp_after_process_entry
qacp_after_batch_processing
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Queue Ajax Calls Performantly」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.1.0 | 1.1.1 | 1.1.2 | 1.1.3 | trunk |
延伸相關外掛(你可能也想知道)
GD Mail Queue 》此外掛可新增郵件佇列系統,攔截所有通過 wp_mail 函式發送的電子郵件,根據預先定義的規則(收件人數量等)將電子郵件加入佇列,每位收件人都能收到電子郵件...。
Mail Queue 》這個外掛可以提升你的 WordPress 網站安全性,藉由延遲 wp_mail() 的發送來完成。, 如果你的網站出現任何異常狀況,例如垃圾信件機器人試圖洪水般攻擊你的聯...。
Mail Queues by PBCI 》使用 SMTP 發送郵件而不超過郵件提供者允許的速率。電子郵件可以使用多個使用者登錄/密碼進行發送,以提供容錯能力,並使每個郵件略微不同,因此更不太可能被...。
yapb-queue 》此外掛可依照時間區間排程 YAPB 目錄中的圖片。, 讀取 IPTC 資料以設定標題、內容和標籤。, 非常適合用於照片部落格。, 典型使用方式, , 使用你喜愛的照片編...。
Virtual Queue 》使用這個外掛程式,您可以限制網站的訪客人數,並將超過限制的人數保留在虛擬隊列中,直到有新的空間可用為止。, , 您可以使用以下的縮短代碼 [virtual-queue...。
Simple Email Queue 》外掛主頁 | 外掛作者 | Plus 版本, Simple Email Queue 是一個 WordPress 外掛,用於在特定期間內通過您的主機設置的限制,決定發送多少封電子郵件。, 這個基...。
Queue Posts 》允許您將新文章排入佇列,在指定的間隔時間後進行發佈。。
Postqueue 》有時你無法使用任何參數來排序你想要的文章順序,只能手動排序。Postqueue 可以幫助你做到這一點。, 此外掛程式為 Grid 提供了一個新的方塊。, 自訂章節。
Post to Queue 》外掛主頁 | 外掛作者 | 捐款, 不希望一次發佈所有文章,但又討厭手動排程/重新排程?Post to Queue 提供應對方法。你只需將文章丟入佇列,它們就會在與該文章...。
Waitpage.io 》這個外掛能讓你將過多的流量重新導向到一個佇列系統中,以避免網站發生崩潰。。
Mailer 》Mailer 是一個外掛程式,當你的網站被訪問時會慢慢地向使用者發送電子郵件,並確保在限制範圍內有順暢的郵件流。, Mailer 能夠與 WordPress 及其他所有外掛程...。
LH Email Queue and Log 》如果您正在發送大量電子郵件,這是您所需要的外掛程式。, , 通常情況下,WordPress 電子郵件最好由第三方(例如gmail或Sendgrid)發送。但是,將大量電子郵件...。