Description
The {eac}Doojigger Object Cache ({eac}ObjectCache) is a light-weight and very efficient drop-in persistent object cache that uses a fast SQLite database 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 memory but to also store data persistently, across requests, 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.
Features
- Lightweight, efficient, and fast!
- L1 (memory) and L2 (SQLite) caching.
- Supports Write-Back (delayed transactions) or Write-Through caching.
- Cache by object group name.
- Preserves uniqueness of keys.
- Manage keys by group name.
- Pre-fetch object groups from L2 to L1 cache.
- Caches and pre-fetches L2 misses (known to not be in L2 cache).
- Prevents repeated, unnecessary L2 cache reads across requests.
- Multisite / Network support:
- Cache by blog id.
- Flush by blog id.
- Caching statistics:
- Overall and L1/L2 hits, misses, & ratio.
- L1 hits by object groups.
- L2 group keys stored.
- L2 select/update/delete/commit counts.
- Supports a superset of WP_Object_Cache functions.
- Imports existing transients when enabled.
- Easily enabled or disabled from administrator page.
- Uses the PHP Data Objects (PDO) extension included with PHP.