acs-aem-samples
acs-aem-samples copied to clipboard
Flush Agent
@andrewmkhoury any chance you have a sample sitting around?
@sham linked out to this .. https://github.com/cqsupport/webinar-dispatchercache/blob/master/src/refetching-flush-agent/jcr_root/apps/replication/src/com.day.cq.replication.dispatcher/src/main/java/com/day/cq/replication/dispatcher/DispatcherFlushContentBuilder.java
@davidjgonzalez what exactly are you looking for? You want to implement some custom dispatcher flush functionality or a custom CDN flush agent?
@andrewmkhoury samples are more generic "code skeletons" that have a commenting narrative describing what different to method responsibilities are and why/how their used.
Samples don't typically "do" anything -- we could have a specific sample where for an agent that describes calling out to some external service.
Ok, I get it now, sorry I don't have a sample of a custom flush agent then. The code that @sham linked to is a example of how to implement a flush ContentBuilder for the re-fetching flush feature of dispatcher. It just adds a request body with POST parameters to the flush request. It is only the "Serialization Type" part of a custom flush implementation. If you want a generic flush agent sample (as a starting point for a custom flush agent that can flush CDN, Dispatcher, Varnish or any other cache technology) you would also need to implement the "skeleton" of a TransportHandler.
@andrewmkhoury gotcha! Yeh - i made this item before @Sham sent the link in the CQ Gems; I can take a stab at this; Maybe ill ping you for a quick review to ensure im not explaining anything incorrectly.
Also - thanks for heads up on the Transport Handler!
It sounds like it might make sense to start w a slightly more pointed sample; Ex. CDN Flush Agent; and leave out the CDN specific API calls. (ex. // Call CDN API flush method here)