Closed talisman-innovations closed 7 years ago
This isn’t a complete solution so I’m closing this and looking for a better one.
Did you find any solution for this @stevenbrookes?
I'm using the solution I posted. Not sure why it's not complete...@jongotlin
I was about to use a similar solution when I say your pr. Any chance this can be merged @dmishh @Nyholm ?
Sure.
@stevenbrookes It is not complete because it always clears the cache. It should probably implement Symfonys: ResetableInterface so cache gets cleared when rebooting the kernel.
When using the cache, for example redis, long running PHP processes are made aware when a setting is saved. This is due to the cache being invalidated on save. However if this happens the bundle will reload the setting from the global and user settings, rather than from the DB. This means the previous, now incorrect setting will be loaded.
The following patch ensures that the the cache is empty then the global or user setting is removed from local storage forcing the information to be pulled from the DB, refilling the cache correctly for call other clients. Impact is very small with a decent cache lifetime and long running processes are kept in sync.