前言介紹
- 這款 WordPress 外掛「WP File Cache」是 2010-02-11 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 700 個安裝啟用數。
- 上一次更新是 2010-12-16,距離現在已有 5253 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.6 以上版本才可以安裝。
- 有 2 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
cache | file cache | performance | object cache |
內容簡介
這個外掛實現了物件級持久性快取,可以作為 WordPress 內置的 WP_Object_Cache 的替代品使用。
與 WP Super Cache、Hyper Cache 和其他外掛不同,WP File Cache 不會快取整個頁面,而是快取 WordPress 明確請求快取的數據(使用 wp_cache_xxx() API 函數)。
儘管這意味著性能會比使用 WP Super Cache 等外掛差一些,但您的所有頁面依然保持動態。
如果您正在使用的外掛或主題沒有使用 WordPress 快取 API,則 WP File Cache 將無法幫助您。這是有意設計的,因為這個外掛試圖友好地運作。但是,對於大多數 WordPress 安裝來說,這將不是關鍵性問題。
WP File Cache 顯著降低了您數據庫的負載。例如,我的博客首頁,在啟用該外掛之前執行的 24 次查詢(0.02403 秒),但啟用之後只有 4 次查詢(0.00188 秒)。
與 DB Cache/DB Cache Reloaded 不同,該外掛將在管理面板中運作,並支援所有使用 WordPress 快取 API 的插件。
請注意,WP File Cache 將負載從您的數據庫轉移到您的磁盤/文件系統上,如果磁盤 I/O 是瓶頸,基於文件的快取將對您沒有幫助。
為了獲得最大的快取性能,請在您的 php.ini 中禁用 open_basedir — 它會使事情變得非常慢。
警告:啟用 PHP 安全模式且 Web 服務器由不同的用戶擁有檔案時,該插件可能無法運作。
wp-config.php 靈幻常數
有一個靈幻常數,WP_FILE_CACHE_LOW_RAM。當 ini_get('memory_limit') - memory_get_usage() 小於 WP_FILE_CACHE_LOW_RAM 時,快取會部分停用。
這意味著仍然會使用內存快取中可用的數據,但不會從文件中讀取。當您在 class.FileCache.php 中遇到記憶體不足出錯時,這可以很有用。
默認情況下,此功能已關閉,但您可以使用以下定義啟用它:
define('WP_FILE_CACHE_LOW_RAM', '4M');
將 4M 替換為您的值。
停用/刪除
請確保網頁伺服器可以寫入 wp-content 目錄:這個外掛需要刪除其中的 object-cache.php。
通過 WordPress 的「插件」選單停用/卸載外掛。
請驗證 wp-content/object-cache.php 檔案是否已被刪除。
原文外掛簡介
The plugin implements object level persistent caching and can be used instead of the built in WordPress WP_Object_Cache.
Unlike WP Super Cache, Hyper Cache and other plugins, WP File Cache does not cache the entire page; instead, it caches the data WordPress explicitly asks it to cache (using wp_cache_xxx() API functions).
Although this means that the performance will be less than with, say, WP Super Cache, all your pages remain dynamic.
WP File Cache won’t help you much if the plugins or theme you are using do not use WordPress Cache API. This is by design, since the plugin tries to play nice. However, for most WordPress installations this will not be critical.
WP File Cache significantly reduces the load from your database. Say, my blog’s home page without the plugin executes 24 queries (0.02403 sec); with the plugin enabled, only 4 queries (0.00188 sec).
Unlike DB Cache/DB Cache Reloaded, the plugin will work in the Admin Panel and supports all plugins that use WordPress Cache API.
Please note that WP File Cache shifts the load from your database to your disk/file system and if Disk I/O is a bottleneck, file based caches will not help you.
To get the maximum cache performance, please disable open_basedir in your php.ini — it really slows the things down.
WARNING: chances are that the plugin will not work when PHP safe mode is enabled and web server is operated by a different user than owns the files.
wp-config.php Magic Constants
There is one magic constant, WP_FILE_CACHE_LOW_RAM. When ini_get('memory_limit') - memory_get_usage() becomes less than WP_FILE_CACHE_LOW_RAM, caching gets partially disabled.
This means that the data that are available in the memory cache will still be used but no reads from the files will be performed. This can be useful when you get Out of Memory errors in class.FileCache.php.
By default this feature is turned off but you can enable it with defining
define('WP_FILE_CACHE_LOW_RAM', '4M');
Repleace 4M with your value.
Deactivation/Removal
Please make sure that wp-content directory is writable by the web server: the plugin will need to delete object-cache.php from it.
Deactivate/uninstall the plugin through the ‘Plugins’ menu in WordPress.
Please verify that wp-content/object-cache.php file was removed.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP File Cache」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.2.5 | 1.2.6 | 1.2.7 | 1.2.8 | 1.2.9 | trunk | 1.2.8.1 | 1.2.8.2 | 1.2.9.1 |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。