Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25003

Clear HTTP cache when trashing, recovering and deleting content/locations

    Details

      Description

      Steps:

      1. Go to PlatformUI;
      2. Create 10 Articles
      3. Go to these articles parent Location
      4. Click on each of the articles and "Send to Trash"
      5. The number of "Sub-items" will remain the same and the "Next >" "Last >" links will be active

        Issue Links

          Activity

          Pedro Resende (Inactive) created issue -
          Pedro Resende (Inactive) made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10037 ]
          Pedro Resende (Inactive) made changes -
          Link This issue discovered while testing EZP-24716 [ EZP-24716 ]
          Damien Pobel (Inactive) made changes -
          Environment Steps:

          1. Go to PlatformUI;
          2. Create 10 Articles
          3. Click on each of the articles and "Send to Trash"
          4. The number of "Sub-items" will remain the same and the "Next >" "Last >" links will be active
          Damien Pobel (Inactive) made changes -
          Description Steps:

          1. Go to PlatformUI;
          2. Create 10 Articles
          3. Click on each of the articles and "Send to Trash"
          4. The number of "Sub-items" will remain the same and the "Next >" "Last >" links will be active
          Hide
          Damien Pobel (Inactive) added a comment -

          I guess it only happens in the prod environment and then it comes from the cache issue as the one behind EZP-24708.

          Show
          Damien Pobel (Inactive) added a comment - I guess it only happens in the prod environment and then it comes from the cache issue as the one behind EZP-24708 .
          Damien Pobel (Inactive) made changes -
          Environment "prod" env.
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-24708 [ EZP-24708 ]
          Damien Pobel (Inactive) made changes -
          Component/s Caching [ 10786 ]
          Component/s Platform/REST API v2 [ 10310 ]
          Damien Pobel (Inactive) made changes -
          Summary Sub-items list not being correctly updated after object removal Sub-items count not being correctly updated after object removal
          Damien Pobel (Inactive) made changes -
          Priority High [ 3 ] Medium [ 4 ]
          Damien Pobel (Inactive) made changes -
          Description Steps:

          1. Go to PlatformUI;
          2. Create 10 Articles
          3. Click on each of the articles and "Send to Trash"
          4. The number of "Sub-items" will remain the same and the "Next >" "Last >" links will be active
          Steps:

          1. Go to PlatformUI;
          2. Create 10 Articles
          3. Go to these articles parent Location
          4. Click on each of the articles and "Send to Trash"
          5. The number of "Sub-items" will remain the same and the "Next >" "Last >" links will be active
          Hide
          Damien Pobel (Inactive) added a comment -

          Easier way to reproduce: no need to create 10 articles, one is enough

          Show
          Damien Pobel (Inactive) added a comment - Easier way to reproduce: no need to create 10 articles, one is enough
          Damien Pobel (Inactive) made changes -
          Summary Sub-items count not being correctly updated after object removal Sub-items count not being correctly updated after sending to trash a child Content item
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25425 [ EZP-25425 ]
          Damien Pobel (Inactive) made changes -
          Status Confirmed [ 10037 ] InputQ [ 10001 ]
          Bertrand Dunogier made changes -
          Affects Version/s 16.02 [ 14501 ]
          Bertrand Dunogier made changes -
          Fix Version/s 16.04 [ 14502 ]
          Bertrand Dunogier made changes -
          Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ]
          Bertrand Dunogier made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Bertrand Dunogier made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          Show
          Bertrand Dunogier added a comment - PR https://github.com/ezsystems/ezpublish-kernel/pull/1635 .
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezsystems/ezpublish-kernel#1635 (Web Link)" [ 16427 ]
          Bertrand Dunogier made changes -
          Status Development Review [ 10006 ] InputQ [ 10001 ]
          Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ]
          Bertrand Dunogier made changes -
          Epic Link EZP-25696 [ 54060 ]
          Damien Pobel (Inactive) made changes -
          Rank Ranked lower
          Bertrand Dunogier made changes -
          Fix Version/s 16.04 [ 14502 ]
          Hide
          André Rømcke added a comment - - edited

          Suggested approach to fix summarized on the now closed PR above:

          Temporary fix to solve the fatal errors*:
          • keep the new Slot added in https://github.com/ezsystems/ezpublish-kernel/pull/1635.
          • however also add a new PurgeForLocationHttpCacheSlot and use it instead here and in MoveSubtreeSlot and UnnassignUserFromUserGroupSlot, deprecate PurgeAllHttpCacheSlot. You'll end up using GatewayCachePurger->purge() for this which is deprecated, reason why it is deprecated is that it can not take advantage of the Cache clear rules using the ContentCacheClearEvent stuff, however maybe that is ok, as the feature seems miss designed, see also below.

          This will esentially also solve https://jira.ez.no/browse/EZP-24621

          Followup story to solve it fully, options:
          • Either we change the API on such operations to be a command (start move towards CQRS), and lets events/slots enhance the command object so it can add meta info about affected location id's for instance which is used after the operation itself to clear cache.
            • Alternatively as part of this we handle commands async, so then we can handle operation in batch and get it to emit events for every single location deleted, meaning bug fix done now will be useful as we discussed above.
          • Or we solve this with HTTPCache multi tagging, however this is progressing slowly at FOS.
          • Or we can as a bit smaller effort add array for affected location id's on signals affecting trees, and get SignalSlot repo to call a new spi/api to get location id's in a tree before the operation itself (so similar to option 1, easier todo, no api change, but not as clean).
          Show
          André Rømcke added a comment - - edited Suggested approach to fix summarized on the now closed PR above: Temporary fix to solve the fatal errors*: keep the new Slot added in https://github.com/ezsystems/ezpublish-kernel/pull/1635 . however also add a new PurgeForLocationHttpCacheSlot and use it instead here and in MoveSubtreeSlot and UnnassignUserFromUserGroupSlot, deprecate PurgeAllHttpCacheSlot. You'll end up using GatewayCachePurger->purge() for this which is deprecated, reason why it is deprecated is that it can not take advantage of the Cache clear rules using the ContentCacheClearEvent stuff, however maybe that is ok, as the feature seems miss designed, see also below. This will esentially also solve https://jira.ez.no/browse/EZP-24621 Followup story to solve it fully, options: Either we change the API on such operations to be a command (start move towards CQRS), and lets events/slots enhance the command object so it can add meta info about affected location id's for instance which is used after the operation itself to clear cache. Alternatively as part of this we handle commands async, so then we can handle operation in batch and get it to emit events for every single location deleted, meaning bug fix done now will be useful as we discussed above. Or we solve this with HTTPCache multi tagging, however this is progressing slowly at FOS. Or we can as a bit smaller effort add array for affected location id's on signals affecting trees, and get SignalSlot repo to call a new spi/api to get location id's in a tree before the operation itself (so similar to option 1, easier todo, no api change, but not as clean) .
          André Rømcke made changes -
          Link This issue relates to EZP-24621 [ EZP-24621 ]
          André Rømcke made changes -
          Assignee André Rømcke [ andre.romcke@ez.no ]
          Damien Pobel (Inactive) made changes -
          Link This issue is duplicated by EZP-25920 [ EZP-25920 ]
          Hide
          Damien Pobel (Inactive) added a comment -

          Any news on that ? QA reported EZP-25920 which is a direct consequence of this one

          Show
          Damien Pobel (Inactive) added a comment - Any news on that ? QA reported EZP-25920 which is a direct consequence of this one
          Damien Pobel (Inactive) made changes -
          Affects Version/s 1.4.0-beta1 [ 14528 ]
          Hide
          Damien Pobel (Inactive) added a comment -

          André Rømcke alright, then it should probably not be in the inputQ nor assigned to you (I had the impression you were about to start on it).

          Also, I think we have a similar same cache issue in EZP-25919 where the REST resources /api/ezp/v2/content/objects/<ContentId> are not cleared when sending or restoring the main Location of the Content <ContentId> to/from the trash.

          Show
          Damien Pobel (Inactive) added a comment - André Rømcke alright, then it should probably not be in the inputQ nor assigned to you (I had the impression you were about to start on it). Also, I think we have a similar same cache issue in EZP-25919 where the REST resources /api/ezp/v2/content/objects/<ContentId> are not cleared when sending or restoring the main Location of the Content <ContentId> to/from the trash.
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25919 [ EZP-25919 ]
          André Rømcke made changes -
          Link This issue is duplicated by EZP-24944 [ EZP-24944 ]
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-26107 [ EZP-26107 ]
          André Rømcke made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          André Rømcke made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          Show
          André Rømcke added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/1746
          André Rømcke made changes -
          Fix Version/s Customer request [ 11018 ]
          André Rømcke made changes -
          Link This issue is duplicated by EZP-24944 [ EZP-24944 ]
          André Rømcke made changes -
          Link This issue relates to EZP-24944 [ EZP-24944 ]
          Hide
          André Rømcke added a comment - - edited
          Show
          André Rømcke added a comment - - edited Merged: https://github.com/ezsystems/ezpublish-kernel/commit/5aee894772ca931614e98008774c112ae000f85c QA: See this issue + sub task.
          André Rømcke made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Fix Version/s 1.3.2 [ 14530 ]
          Fix Version/s 1.5.0 [ 14582 ]
          Fix Version/s 1.4.2 [ 14595 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          André Rømcke made changes -
          Summary Sub-items count not being correctly updated after sending to trash a child Content item Clear HTTP cache when trashing, recovering and deleting content/locations
          Rui Silva (Inactive) made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          André Rømcke made changes -
          Link This issue relates to EZP-26013 [ EZP-26013 ]
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for 1.3, 1.4 and master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for 1.3, 1.4 and master.
          Rui Silva (Inactive) made changes -
          Assignee Rui Silva [ rui.silva@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 96343 ] EZEE Development Workflow [ 125217 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Confirmed Confirmed
          7s 1 pedro.resende@ez.no 20/Oct/15 1:40 PM
          Confirmed Confirmed InputQ InputQ
          181d 22h 10m 1 damien.pobel@ez.no 19/Apr/16 11:50 AM
          Development Review Development Review InputQ InputQ
          55m 10s 1 Bertrand Dunogier 19/Apr/16 6:38 PM
          InputQ InputQ Development Development
          111d 4h 24m 2 André Rømcke 08/Aug/16 5:15 PM
          Development Development Development Review Development Review
          4m 44s 2 André Rømcke 08/Aug/16 5:15 PM
          Development Review Development Review Documentation Review done Documentation Review done
          1d 18m 1 André Rømcke 09/Aug/16 5:33 PM
          Documentation Review done Documentation Review done QA QA
          18m 35s 1 rui.silva@ez.no 09/Aug/16 5:52 PM
          QA QA Closed Closed
          17h 59m 1 rui.silva@ez.no 10/Aug/16 11:51 AM

            People

            • Assignee:
              Unassigned
              Reporter:
              Pedro Resende (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 30 minutes
                4h 30m