[WordPress] 外掛分享: SQLite Cache

前言介紹

  • 這款 WordPress 外掛「SQLite Cache」是 2015-05-20 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2016-07-01,距離現在已有 3229 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.8.1 以上版本才可以安裝。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

andreyk |

外掛標籤

cache | SQLite | performance |

內容簡介

當第一次請求到特定的 URL 時,整個網頁的 HTML 原始碼會被存儲在 SQLite 資料庫中。當對同一頁面進行下一次請求時,WordPress 核心將不會被加載,而是從 SQLite 儲存的內容擷取頁面,因此 PHP 執行時間可減少數十倍。

在同一 Web 伺服器上的多個網站可以使用共同的 SQLite 儲存。與 WordPress 多站點相容。需要 PHP SQLite PDO。

與生成靜態 HTML 頁面的外掛程序相比,此外掛程序不會建立多個目錄和 HTML 檔案,而是將所有生成的頁面儲存在一個檔案中。此外,在同一 Web 伺服器上的許多 WordPress 網站可以使用共同的 SQLite 儲存。保留 404、301、302、304 HTTP 狀態,可選支援 ETag、Expires、Content-Length、Content-Type(含字符集)標頭。

由於快取腳本不加載 WordPress 核心,它如何保存其設置?

要使外掛程式運作,您需要在 WordPress 安裝目錄的 index.php 中定義 SQLite 儲存位置(注意,不是在 wp-config.php 中,而是在 index.php 中)。除了 SQLite 檔案外,此目錄還包含一個常規設置檔案(壓縮設置)和一個用於每個域的子資料夾設置。在管理區域(外掛程式設定頁面)中並且在停用後仍能記住快取位置,WordPress 選項 litecache_path 會被使用。

此外掛如何處理具有和不具有「www.」前綴的網址?

「www.」前綴的存在已在「設定」-「常規」中定義。外掛程式將在快取目錄中的 domains/yourdomain.ini 檔案中儲存 with_www 參數並相應地重新導向請求;這些重新導向在使用快取之前進行處理。

此外掛是否相容於 WordPress 多站點?

是的,但僅適用於子網域模式(blogname.example.com),不適用於 example.com/blogname。多站點網絡的超級管理員可以訪問第一個設置表單(快取位置),網站管理員可以訪問第二個表單和清除表單。

原文外掛簡介

On first request to a given URL whole html code of a page is being stored in
the SQLite database. On next requests to the same page WordPress core will
not be loaded at all but the content of a page will be retrieved from the
the SQLite storage therefore duration of PHP execution decreases in dozen
of times.
Many sites on the same webserver may use common SQLite storage.
Compatible with WordPress Multisite. Requires PHP SQLite PDO.
In comparison with plugins generating static html pages this plugin does not
create multiple directories and html files but stores all generated pages
in one file. Moreover, many wordpress sites on the same webserver may use
common SQLite storage. Keeps 404, 301, 302, 304 HTTP statuses, optionally
supports ETag, Expires, Content-Length, Content-Type (with charset) headers.
As the cache script doesn’t load the WordPress core where does it save it’s settings?
To get the plugin working you need to define the SQLite storage location in
the index.php of the wordpress installation directory (note, not in wp-config.php
but index.php). Besides of the SQLite file, this directory contains general
settings file (compression setting) and a subfolder for per domain settings.
In the admin area (plugin setting page) and to remember after deactivation where
the cache located, litecache_path WordPress option is used.
How the plugin handles URLs with and without `www.` prefix?
The presence of www. prefix is defined in Settings – General.
The plugin stores with_www parameter in domains/yourdomain.ini file in the
cache directory and redirects requests correspondingly; these redirects are
being processed before cache usage.
Is it WordPress Multisite compatible?
Yes, but for subdomains mode only (blogname.example.com), not for
example.com/blogname. A superadmin of a multisite network has access to
the first setting form (cache location), blog admins have access to the
second form and purge form.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「SQLite Cache」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


最新版本

延伸相關外掛(你可能也想知道)

文章
Filter
Apply Filters
Mastodon