Get answers to your Object Cache questions.Discuss in our Forum Discuss in Slack
This section provides answers to frequently asked Object Cache questions.
How much Object Cache is available for each plan level?
|Plan||Cache Memory Limit (in MB)|
|Performance M, L, XL||512|
*Object Cache is available on free Sandbox plans for usage during development and will remain available through upgrades to any other plan except for Basic. Refer to the Object Cache Requirements section for details about which account types have Object Cache on paid plans.
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
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.
How is Redis Configured on the Platform?
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:
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.
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.
Go to the Site Dashboard and click the Connection Info button.
Copy the SFTP command line string and replace
cacheserver. You can see where the log files and configuration reside:
sftp -o Port=2222 firstname.lastname@example.org 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.