Clearing the cache should not flush the Markdown cache by default
When we deploy an Omnibus package we run rake cache:clear
. This task in turn will flush both the Redis cache and the database cache. The database cache is used for storing Markdown columns. Running this on every deploy is a rather expensive process as it effectively results in PostgreSQL replacing all rows containing Markdown columns (e.g. all notes
rows). We should not flush this cache unless explicitly necessary. There are two ways of doing this:
- Remove the
db
task fromrake cache:clear:all
- Change Omnibus to only flush the Redis cache, instead of all caches
I personally prefer option 1 since Omnibus shouldn't have to care about Redis vs DB caches.