Prep to remove Readthis in favor of ActiveSupport::Cache::RedisCacheStore#5337
Prep to remove Readthis in favor of ActiveSupport::Cache::RedisCacheStore#5337zachmargolis merged 14 commits intomainfrom
Conversation
There was a problem hiding this comment.
🚨 ok so this is going to be a doozy ---- the Readthis gem serializes and deserializes via Marshal (😭) and also does some compression, and we use this for important data that is not strictly caching (ServiceProviderRequests and proofing intermediate results), so we need to handle this carefully
I think we have a few options:
- Leave in this gem forever because data migration is scary
- Write our own code that reads/writes the Marshal + Deflate compression to migrate
- Dual reads/write: leave in gem while we read from old locations, but then always write to newer locations (ex with JSON serialization)
I think 3 is the safest and helps us minimize our dependencies
There was a problem hiding this comment.
I'm going with (3), but also going to namespace the new writes to make sure we don't write to JSON parse Marshal'd data or otherwise
There was a problem hiding this comment.
3 makes sense and is the lowest risk 👍🏼
27fa159 to
a8e7dcc
Compare
7d04164 to
0fe4737
Compare
config/initializers/rack_attack.rb
Outdated
There was a problem hiding this comment.
the namespace should separate new data from old data, it means there will essentially be a reset on the rack-attack values after a deploy, but I think the timeouts are short-lived enough things will be okay?
- Also just use plain redis connections elsewhere in the app
This reverts commit dab2211d99b57def8d434dc30e65500993a2bbb7.
…ugh readthis for now 🤷
469c165 to
eedf20a
Compare
|
This is ready to review! |
Builds on #5335 (because that renamed REDIS_POOL to READTHIS_POOL) --- happy to flip the order on these if anybody feels strongly