Right now, in order to completely empty all entries from a specific storage, you need to iterate over the results of listAll() and delete each entry one by one. Most storage engines can handle this a lot more efficiently, so we should add a deleteAll() function to StorageInterface() along with an implementation for all existing engines.

#2 1851180-delete-all-2.patch5.81 KBgdd
PASSED: [[SimpleTest]]: [MySQL] 48,979 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


gdd’s picture

Assigned: Unassigned » gdd
gdd’s picture

Status: Active » Needs review
5.81 KB
PASSED: [[SimpleTest]]: [MySQL] 48,979 pass(es). View

Implements deleteAll() in the interface and all storage engines, plus tests.

mahtoranjeet’s picture

Status: Needs review » Reviewed & tested by the community

1) Installed New Drupal 8
2) Downloaded patch #2 and apply.

deleteAll Function is added to Drupal/Core/config/StorageInterface.php file

catch’s picture

Status: Reviewed & tested by the community » Fixed

Looks good. Committed/pushed to 8.x.

Automatically closed -- issue fixed for 2 weeks with no activity.