import com.adobe.cq.social.ugcbase.dispatcher.api.FlushService;
@Reference
FlushService flushService;
Then you can simply request a cache invalidation for the corresponding page-
flushService.sendFlushUrl("userId",
FlushService.FlushType.IMMEDIATE_FLUSH, resourceUrl,
FlushService.RefetchType.IMMEDIATE_REFETCH,
new String[] { resourceUrl });
Here resourceUrl is the path of the page without html extension.
In order to make the flush service working properly, create flush agents for each dispathcer with following additional settings-
1. Set the Request method - "POST" because this service expects a POST method flush agent.
2. Send additional parameter for "resource only replication"
-To debug any issues you can add a custom logger from OSGi configurations console on this package-
com.adobe.cq.social.ugcbase.dispatcher.impl.FlushServiceImpl
ACM AEM Commons tool also provides options to help implementing cache invalidation for you through OSGi configurations.
Read More
FlushService.FlushType.IMMEDIATE_FLUSH, resourceUrl,
FlushService.RefetchType.IMMEDIATE_REFETCH,
new String[] { resourceUrl });
Here resourceUrl is the path of the page without html extension.
In order to make the flush service working properly, create flush agents for each dispathcer with following additional settings-
1. Set the Request method - "POST" because this service expects a POST method flush agent.
2. Send additional parameter for "resource only replication"
-To debug any issues you can add a custom logger from OSGi configurations console on this package-
com.adobe.cq.social.ugcbase.dispatcher.impl.FlushServiceImpl
ACM AEM Commons tool also provides options to help implementing cache invalidation for you through OSGi configurations.
Read More
No comments:
Post a Comment
If you have any doubts or questions, please let us know.