sorentwo / readthis

:newspaper: Pooled active support compliant caching with redis
MIT License
504 stars 40 forks source link

Rails 6 cache versioning error #67

Closed bbugh closed 5 years ago

bbugh commented 5 years ago

Hi, we upgraded to Rails 6 and it's gone mostly well. While trying to push to a staging environment, the process failed with this error:

rake aborted!

You're using a cache store that doesn't support native cache versioning.
Your best option is to upgrade to a newer version of Readthis::Cache
that supports cache versioning (Readthis::Cache.supports_cache_versioning? #=> true).

Next best, switch to a different cache store that does support cache versioning:
https://guides.rubyonrails.org/caching_with_rails.html#cache-stores.

To keep using the current cache store, you can turn off cache versioning entirely:

    config.active_record.cache_versioning = false

It looks like Readthis doesn't support Rails' cache versioning. Is it possible that this functionality can be added?

sorentwo commented 5 years ago

@bbugh It is definitely possible to get this functionality added. A PR would be welcome, but in lieu of that I'll try and get a patch out in the next week.

sorentwo commented 5 years ago

After considering these changes and investigating the new API I've decided not to support cache versioning in Readthis. The built in Redis Cache added in 5.2 supports most of the important features of Readthis, plus a few extras, and it is supported by the Rails core team.

The README is updated to recommend that everybody using Rails 5.2+ should consider switching.

bbugh commented 5 years ago

@sorentwo thank you for your research on this topic, and all of your hard work on readthis. It served us very well for a long time. You're a hero.