Linux 软件免费装
Banner图

{eac}ObjectCache - a persistent object cache using a SQLite & APCu to cache WordPress objects.

开发者 kevinburkholder
更新时间 2025年10月4日 00:09
捐献地址: 去捐款
PHP版本: 8.1 及以上
WordPress版本: 6.8
版权: GPLv3 or later
版权网址: 版权信息

标签

performance object cache APCu sqlite wp cache {eac}Doojigger persistent object cache

下载

1.0.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.0.4 1.1.0 1.2.2 1.3.4 1.3.3 1.4.0 1.4.1 2.0.0

详情介绍:

The {eac}ObjectCache is a light-weight and very efficient drop-in persistent object cache that uses a fast SQLite database and even faster APCu shared memory to cache WordPress objects. See The WordPress Object Cache
The WordPress Object Cache is used to save on trips to the database. The Object Cache stores all of the cache data to memory and makes the cache contents available by using a key, which is used to name and later retrieve the cache contents. By default, the object cache is non-persistent. This means that data stored in the cache resides in memory only and only for the duration of the request. Cached data will not be stored persistently across page loads unless you install a persistent caching plugin.
Here, an object is any piece of data - a number, text, a set of database records, an API response, etc. - that can be referenced by a name or key. Objects are categorized by a group name. Groups help identify what an object is and how it is used. {eac}ObjectCache replaces the default WordPress object cache to not only store data in process memory but to also store data persistently, across requests, in APCu shared memory and/or in a SQLite database, increasing the likelihood of cache hits and decreasing the need for costly computations, complex MySQL database queries, and remote API requests. SQLite is a fast, small, single-file relational database engine. By using SQLite to store objects, {eac}ObjectCache is able to manage a relatively large amount of data (groups, keys, and values) in a very efficient and fast data-store. APCu is a shared, in-memory, persistent cache available only when the APCu PECL Extension is installed. {eac}ObjectCache uses APCu as an intermediate cache between the L1 memory cache and the L2 SQLite database cache providing extremely fast object retrieval, {eac}ObjectCache always uses per-request, in-memory caching and may operate with either APCu memory caching or SQLite database caching - or both. APCu memory caching uses a single block of memory shared by all PHP requests and is persistent until and unless the cache is cleared or the server is rebooted (or PHP restarted). SQLite database caching is persistent until and unless the cache is deliberately cleared. Features While {eac}ObjectCache does support multiple installations on a single server it does not support multiple servers per installation. SQLite and APCu work only on a single server, not in a clustered or load-balanced environment. Configuration Alternatives Assuming you have SQLite and APCu installed, what are your best options?
  1. Fastest Caching
  2. Disable SQLite. [^1]
  3. define( 'EAC_OBJECT_CACHE_USE_DB', false );
  4. Uses in-process memory and APCu shared memory.
  5. Advantage
  6. Fast memory-only access.
  7. Disadvantage
  8. APCu may invalidate data under memory constraint.
  9. APCu cache is lost on system or PHP restart.
  10. Less memory (almost as fast)
  11. Disable SQLite. [^1]
  12. define( 'EAC_OBJECT_CACHE_USE_DB', false );
  13. Optimize memory use. [^1]
  14. define( 'EAC_OBJECT_CACHE_OPTIMIZE_MEMORY', true );
  15. Uses in-process memory and APCu shared memory.
  16. Advantage
  17. Fast memory-only access.
  18. Conserves per-request memory by not pushing APCu hits to in-process memory.
  19. Disadvantage
  20. Slightly slower to access APCu memory over in-process memory.
  21. APCu may invalidate data under memory constraint.
  22. APCu cache is lost on system or PHP restart.
  23. Most resilient (and still fast)
  24. Do nothing, this is the default.
  25. Uses in-process memory, APCu shared memory, and SQLite database.
  26. Advantage
  27. Most cache hits will come from in-process and APCu memory.
  28. SQLite retains cache data after restart.
  29. Disadvantage
  30. Must keep SQLite database (on disk) updated.
  31. Resilient, efficient, and fast (recommended)
  32. Optimize memory use. [^1]
  33. define( 'EAC_OBJECT_CACHE_OPTIMIZE_MEMORY', true );
  34. Uses in-process memory, APCu shared memory, and SQLite database.
  35. Advantage
  36. Most cache hits will come from in-process and APCu memory.
  37. Conserves per-request memory by not pushing APCu hits to in-process memory.
  38. SQLite retains cache data after restart.
  39. Disadvantage
  40. Slightly slower to access APCu memory over in-process memory.
  41. Must keep SQLite database (on disk) updated.
  42. Least efficient (default when APCu is not installed)
  43. Disable APCu. [^1]
  44. define( 'EAC_OBJECT_CACHE_USE_APCU', false );
  45. Uses in-process memory and SQLite database.
  46. Advantage
  47. Saves resources by not taking up APCu reserves.
  48. SQLite retains cache data after restart.
  49. Disadvantage
  50. All cached data read from disk.
  51. Must keep SQLite database (on disk) updated.
[^1]: These options may be set from the {eac}Doojigger administration screen. When using SQLite, delayed writes (see below) dramatically improves efficiency by only writing updates at the end of the script process. Inside The Numbers | Label         | Value | | :-------------- | :--------------- | | cache hits | The total number of requests that returned a cached value. | | cache misses | The total number of requests that did not return a cached value. This number includes L1 cache (-), L2 non-persistent, L2 APCu (-), and L2 SQL misses. | | L1 cache hits | The number of requests that were found in the L1 memory cache. | | L1 cache (+) | Request found in the L1 memory cache with data (positive hits). | | L1 cache (-) | Request found in the L1 memory cache with no data (negative hits). | | L1 cache misses | The number of requests not found in the L1 memory cache. | | L2 non-persistent | L1 cache misses in a non-persistent group (not in L2 cache). | | L2 APCu hits | The number of L1 cache misses (minus L2 non-persistent) that were found in the L2 APCu cache. | | L2 APCu (+) | Request found in the L2 APCu cache with data (positive hits). | | L2 APCu (-) | Request found in the L2 APCu cache with no data (negative hits). | | L2 APCu misses | The number of requests not found in the L2 APCu cache. | | L2 SQL hits | The number of L2 APCu misses (or L1 cache misses) that were found in the L2 SQLite cache. | | L2 SQL misses | The number of requests not found in the L2 SQLite cache. | | L2 APCu updates | The number of APCu keys updated. | | L2 APCu deletes | The number of APCu keys deleted. | | L2 SQL selects | The number of SQLite select statements executed. | | L2 SQL updates | The number of SQLite records updated. | | L2 SQL deletes | The number of SQLite records deleted. | | L2 SQL commits | The number of SQLite transactions executed to update and delete records. |

安装:

{eac}ObjectCache is an extension plugin to and is fully functional with installation and registration of {eac}Doojigger. However, the core object-cache.php file may be installed without {eac}Doojigger (referred to as 'detached' mode). In detached mode, the plugin will attempt to copy the object-cache.php file to the /wp-content folder on activation, or you may manually copy the object-cache.php file from the plugin /src folder to the /wp-content folder to activate. Options can then be set using the documented PHP constants in the wp-config.php file. Automatic Plugin Installation This plugin is available from the WordPress Plugin Repository and can be installed from the WordPress Dashboard » Plugins » Add New page. Search for 'EarthAsylum', click the plugin's [Install] button and, once installed, click [Activate]. See Managing Plugins -> Automatic Plugin Installation Upload via WordPress Dashboard Installation of this plugin can be managed from the WordPress Dashboard » Plugins » Add New page. Click the [Upload Plugin] button, then select the eacobjectcache.zip file from your computer. See Managing Plugins -> Upload via WordPress Admin Manual Plugin Installation You can install the plugin manually by extracting the eacobjectcache.zip file and uploading the 'eacobjectcache' folder to the 'wp-content/plugins' folder on your WordPress server. See Managing Plugins -> Manual Plugin Installation Settings Once installed and activated, options for this extension will show in the 'Object Cache' tab of {eac}Doojigger settings.

屏幕截图:

  • Object Cache (Advanced Options)
  • Object Cache (Cache Stats)

其他记录:

Additional Information {eac}ObjectCache is an extension plugin to and is fully functional with installation and registration of {eac}Doojigger. However, the core object-cache.php file may be installed without {eac}Doojigger - referred to as 'detached' mode. In detached mode, the plugin will attempt to copy the object-cache.php file to the /wp-content folder on activation, or you may manually copy the object-cache.php file from the plugin /src folder to the /wp-content folder to activate. Options can then be set using the documented PHP constants in the wp-config.php file. See Also {eac}KeyValue - An easy to use, efficient, key-value pair storage mechanism for WordPress that takes advatage of the WP Object Cache.

更新日志:

Version 2.0.0 – September 30, 2025 Version 1.4.1 – July 12, 2025 Version 1.4.0 – June 27, 2025 Version 1.3.4 – June 17, 2025 Version 1.3.3 – June 10, 2025 Version 1.3.2 – June 3, 2025 Version 1.3.1 – April 19, 2025 Version 1.3.0 - April 11, 2025 Version 1.2.2 - April 4, 2025 Version 1.2.1 - March 30, 2025 Version 1.2.0 - March 20, 2025 Version 1.1.0 - March 13, 2025 Version 1.0.4 - May 24, 2024 Version 1.0.3 - April 3, 2024 Version 1.0.2 - February 17, 2024 Version 1.0.1 - January 24, 2024 Version 1.0.0 - December 9, 2023 Version 0.5 Version 0.4 Version 0.3 Version 0.2 Version 0.1