Try Now

SpeedyCache Version 1.0.5 Launched: Object Cache

In this version we have added support for Persistent Object Cache powered by Redis with the support of phpRedis, other than this there is a bug fix related to Preload order.

The changes made are listed below:-

  • [Feature] [Pro] Object Cache powered by Redis and supports phpRedis, we will add more options in future.
  • [Bug-Fix] When setting the order of Preload, the order was not getting saved as expected, that issue has been fixed.

For our next major release we will be working on Unused CSS and image dimensions.

Object Cache

Object Cache is already a part of WordPress, it comes out of the box with WordPress, but what Object Cache by SpeedyCache does is, it makes the cache to persist over longer time and over multiple requests.

We have implemented persistent cache using Redis, we are using phpRedis as our connector which is a widely used options for using Redis in PHP.

Redis is an in-memory data store, so by using it we can share the cache over multiple requests. Unlike the default object cache in WordPress, which only lives as long the request.

It reduces the need to make SQL queries, and improves performance, as Redis storing data in-memory don't need a trip to the disk.

Coming back to the Object Cache provided by SpeedyCache, for now we just have phpRedis as the connector but we will be adding more connectors like Relay and predis in future releases.

SpeedyCache Object Cache Settings

Configuration Options

We have tried to make configuring Redis easy to setup. The option we provide are as follows:-

Host: You can either connect to Redis either by TCP or by Unix socket. For TCP you will need to just add the IP 127.0.0.1 which is the default IP for Redis, for you it will be the same too, unless you change it. For TCP you will need a port number too.
For Unix socket you need path to the socket file, something like /var/run/redis/redis-server.sock

Port: It's only required when you are connecting to Redis using the IP(TCP). And the default port is 6379.

Username: It's the username, in Redis username is only available for Redis version 6.0 and above, before that Authentication use to just require password via requirepass configuration.

Password: You can either set password using the requirepass method or using the new auth way by using ACL.

Object Time to Live: Its the expiry time for the data you save, so once that time is reached the Object will be deleted.

Redis DB ID: Redis database had ID's by default they are from 0-16 but you can increase from the redis.conf file. But assuming you are using the default config, set the ID from 0-16 and make sure to set different ID for different websites else you will face issue using your website.

Persistent Connection: It tells Redis if you want to keep the connection live, as it reduces the time of reconnection on every request to redis.

Cache WP-Admin: If you want to cache WP-Admin.

Asynchronous Flushing: It makes deleting of object asynchronous and non-blocking.

Serialization Method: It's how the data is serializes, the options available are Serialization via PHP or using igbinary, using igbinary can help reduce the storage usage by ~50%. But to use that the phpRedis extension you are using should be build with igbinary with it.

Compression Method: These options compresses the data being saved, SpeedyCache Object supports 3 compression methods which are LZF, LZ4, ZSTD. If you dont see any of these 3 options in the settings that means the phpRedis you are using is not build with any of these compression methods.

Do Not Cache Groups: These are the group names you don't want to get cache in the Redis cache.

SpeedyCache Object Settings

For future updates related to object cache, we will be working on integrating predis, Relay, and adding prefetching capabilities.

The SpeedyCache team is working on improving the plugin to help you improve the performance of your WordPress site. If you have any suggestion or feedback do let us know at support@speedycache.com

Newsletter Subscription
Subscribing you to the mailing list