Does anyone know how to achieve purging unused elements using the API? I did some searches on the forum, which turned up that it can only be done using a postable command. But then, how does this node achieve it? The goal is to use it with multiple documents open in the background.
Ah true! For some reason I didn’t think to look at it. Seeing that there was an OOTB node already, I assumed there would be a method in the API
So I see that Genius Loci node basically recreates the whole purge unused logic, which is what you have to do I guess when the API doesn’t give you the ready made tools for it.
I used the node to clear all unused things, Problem:
‘Additional number of Imported Categories’ to purge does not clear with the node.
Users would need to open it once again, only to click once on OK again.
I find that a bit inefficient.
See screenshot below:
yeah probably as in ui itself need run twice anyway you could try do that in dynam0 itself with run the same node with a transaction between, havent tried but could probably work
Note that categories might not be caught by the performance advisor rule that finds the purgeable elements, but my gut says that wiring the first of these into a Transaction.End and then into a Transaction.Start and then into a second purge, end, start and a 3rd purge should do the trick.
That said categories are not something I would stress over as they aren’t going to impact things too much, doubly so if you’re managing them in your templates (if you’re not that’s a bigger issue than the purge tool not getting rid of them).