How to choose a Valkey memory policy in WHMCS
For a Valkey service managed by PD DigitalOcean Databases, choose what should happen when memory fills. This setting matters differently for disposable cached data and data your application must retain.
Identify the workload first
DigitalOcean’s default noeviction policy refuses new writes when the instance is full instead of automatically discarding keys. An eviction policy can free memory by removing keys according to its rule. Do not choose one merely because it may reduce full-memory write errors: decide whether the affected data can safely be recreated.
Open Memory policy
Open the Valkey service’s Overview page and find Memory policy. This control is available for Valkey when the service is available; it is not a setting for MySQL, PostgreSQL, MongoDB, Kafka or OpenSearch.
Select and verify the intended policy
- Review the current policy and the available labelled choices. A blank or unavailable current reading is not proof that the provider has selected a particular default.
- Choose the policy that matches the application’s retention and expiry behaviour. For a cache whose keys can all be discarded, an all-keys LRU policy removes less recently used keys; do not apply that reasoning to irreplaceable records.
- Save the change, read the result and reload to check the displayed policy.
- Review the application’s write errors, memory usage and cache behaviour through its normal monitoring.
Changing eviction policy does not add RAM or establish sufficient write capacity. Review the service capacity if the application’s working set exceeds its memory.
If the policy is unavailable
Check the service is a running Valkey service and read the redacted result. If the save outcome is uncertain, establish the actual policy before repeating changes. Keep database credentials out of shared screenshots.
See the PD DigitalOcean Databases WHMCS guide for related setup, or explore PD DigitalOcean Databases.