episerver - Why is the IContentEvents.LoadedContent event fired multiple times for a page? -
i've added event handler loadedcontent event. i'm bit surprised event seems fire multiple times page during single load. why happen?
protected void application_start() { arearegistration.registerallareas(); servicelocator.current.getinstance<icontentevents>().loadedcontent += this.episerverapplication_loadedcontent; }
edit
i'm using episerver 8.
with "a singe load" mean going dope mode edit mode page child has no children. last time counted event fired 17 times page.
the loadedcontent event fired every time get/tryget on icontentloader (or icontentrepository) called. happens regardless if data loaded through cache or database.
as these apis used many separate code branches, in edit mode, event triggered multiple times have found. should not need worried unless of course doing resource intensive in event handler.
Comments
Post a Comment