Long-running drush/dr command and entity/config cache issues
I am running two docker services that use the same Drupal instance.
The first one, let's call it "http", serves the site, and the second one, let's call it "amqp" runs a drush command that listens to AMQP messages (via rabbitmq) to alter content.
The amqp service process tasks that outlive a normal request; a task can take up to several minutes.
I am experiencing cache issues between both services: when a configuration is updated on the "http" service, the "amqp" service still uses a cached version, and when an entity is updated on "amqp" service, the "http" service still shows the old cached version.
I managed to fix the first issue by calling "ConfigFactory::reset" before retrieving the config object when a new message is processed, but this seems like a dirty fix, and I don't see how I can apply such a fix for the issue regarding entities.
Has anyone experienced such an issue ?
Any ideas of how to deal with this ?
P.S: I have APCu and memcache enabled, but the issue appeared before memcache was installed.
Any help will be highly appreciated.
[link] [comments]