a file is created in dispatcher cache because dispatcher is trying to cache the file, when you try to publish it or go to details page. Browser must be sending a get request for the file and dispatcher must be caching it.
In case of folder, there is no such file requested. dispatcher will not cache any thing.
Why do you want to rely on folder or file being created in dispatcher cache
This tree is /content/dam for Asset in CRXDE Lite.
When I unpublished parent folder(ex:parent) in Asset Page, all children folders(ex:child1, child2,) and all children files(ex:file01.doc, file02.txt, file03.pptx,file04.xlsx) unpublished automatically.
But when I published parent folder(ex:parent) in Asset Page, all children folders(ex:child1, child2,) and all children files(ex:file01.doc, file02.txt, file03.pptx,file04.xlsx) did not publish automatically.
Parent folder(ex:parent) published only.
I can not understand why.
So, Because of that, child has activated child only In line 187 of my source code like below that.
In addition, In my source code, I want to implement the method that activate all child folders and files when parent folder activates in asset page.
To Activate child page automatically on activation of parents, you can write sling event listener which listen this nodes replication event and as soon as parent publish, children pages will also be published.