Heroku Key-Value Store (formerly Heroku Redis) has a default `maxmemory` policy of `noeviction` meaning it'll return errors if you reach the memory limit. To follow the Rails Guides recommendation for cache-only Redis servers (see https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-rediscachestore), set the policy to `allkeys-lfu` instead:
```
$ heroku redis:maxmemory NAME --policy allkeys-lfu
```

Caching with Rails: An Overview — Ruby on Rails Guides
Caching with Rails: An OverviewThis guide is an introduction to speeding up your Rails application with caching.After reading this guide, you will know: What caching is. The types of caching strategies. How to manage the caching dependencies. Solid Cache - a database-backed Active Support cache store. Other cache stores. Cache keys. Conditional GET support.