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_queue database 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

Command icon 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

ajits created an issue. See original summary.

ajits’s picture

Assigned: Unassigned » ajits

I am working on a PR.

ajits’s picture

Assigned: ajits » Unassigned
Status: Active » Needs review

Added a check in a non-dependency-injection way, as the module is not directly dependent on the workspaces module.

ajits’s picture

Issue summary: View changes
ajits’s picture

Would it make sense to make it configurable?