Problem/Motivation
I am working on a client site that use workspaces extensively for content publishing, with multiple editors working on their own site section in their own workspaces. Sometimes a single editor works on multiple workspaces. Each content publish in a workspace triggers a CDN cache clear (Akamai in our case).
Since, the content was not changed (published) in a Live workspace, it stays the same for anonymous user, making the purge unnecessary.
Steps to reproduce
- Enable the workspaces module.
- Add a new workspace and switch to it.
- Edit some content.
- Check the purge queue (you can do it by comparing the count from the
purge_queuedatabase table).
Expected result: No purge queue entries should be created.
Actual result: Purge entries are created.
Proposed resolution
Do not add entries to the purge queue if they are changed in a non-Live workspace.
Remaining tasks
Review
User interface changes
None
API changes
None
Data model changes
None
Issue fork purge-3482222
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ajitsI am working on a PR.
Comment #4
ajitsAdded a check in a non-dependency-injection way, as the module is not directly dependent on the workspaces module.
Comment #5
ajitsComment #6
ajitsWould it make sense to make it configurable?