Skip to main content
Last Reviewed: October 25, 2024

Object Cache FAQs

Review frequently asked questions on Object Caching.


This section provides answers to frequently asked Object Cache questions.

How much Object Cache is available for each plan level?

PlanCache Memory Limit (in MB)
BasicN/A
Performance Small256
Performance M, L, XL512
Elite1024

What Happens When Object Cache Reaches Maxmemory?

Object Cache follows the maxmemory-policy configuration directive when the specified amount of memory is reached. This directive is defined in the platform redis.conf file.

On Pantheon, the maxmemory policy is allkeys-lru: evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. For more information, refer to the official Redis documentation.

Which versions of Redis are available?

There are two available versions of Redis available for the Object Cache: 2.8 and 6.2. The default version for the platform is 2.8 currently. You can set your site's Redis version.

How is Redis Configured on the Platform?

Your redis.conf file can be retrieved via SFTP similarly to how you can download Redis log files (refer to the example below), or you can review it here:

redis.conf
port xxxxx
timeout 300
loglevel notice
logfile /srv/bindings/xxxxxxxxx/logs/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir /srv/bindings/xxxxxxxxx/data/
requirepass xxxxx
maxclients 1024
maxmemory 964689920
maxmemory-policy allkeys-lru
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
activerehashing yes

Note that the maxmemory value will vary based on plan level.

Does Pantheon have optimization recommendations?

Our customers have encountered edge cases that may affect Redis performance under load during high traffic periods. There are several patches to the Drupal module available to alleviate the issues:

Issue DescriptionPatch Link
TTL handling broken, always permanentPatch
Always return array to mget to avoid breaking transactionsPatch
TTL handling broken, always permanentPatch

If Redis Hits the Upper Limit of Memory Usage, Is This Logged on Pantheon?

Yes. There is a redis.log file that is available on the Redis container for each environment.

Follow the steps below to access the Redis container.

  1. Go to the Site Dashboard and click the Connection Info button.

  2. Copy the SFTP command line string and replace appserver with cacheserver. You can see where the log files and configuration reside:

sftp -o Port=2222 live.81fd3bea-d11b-401a-85e0-07ca0f4ce7cg@cacheserver.live.81fd3bea-d11b-401a-85e0-07ca0f4ce7cg.drush.in
Connected to cacheserver.live.81fd3bea-d11b-401a-85e0-07ca0f4ce7cg.drush.in.
sftp> ls
certs          chef.stamp     data           lock           logs           metadata.json  redis.conf     tmp
sftp> ls -la logs/
-rw-r--r-- 1 11455 11455 40674752 Mar 10 19:46 redis.log
sftp>

Why won't my site work after importing a database backup?

When you replace the database with one that doesn't match the Object Cache, it can cause database errors on the site, and you may be unable to clear the cache via the Dashboard. To resolve the issue, flush the Object Cache from the command line.

More Resources

How-to Guides

References

See Also