>
> Hi,
>
> A question for Ard probably .. :)
>
> For a specific usecase we are uploading documents into the
> Hippo Repository from a Hippo-Cocoon webapp. The uploaded
> document should be visible in a list right *after* the form
> is submitted and the document has been uploaded. However, the
> Cocoon cache is not cleared yet, because the JMS event
> related to the uploaded document didn't arrive in Cocoon yet.
> Is it possible to programmatically clear all cache entries
> which are cleared when the JMS event arrives, i.e.
> 'simulating' a JMS event internally ?
Yes it is possible because I implemented a similar behavior for the cms
tree and listing: the cms itself does a fireEvent which invalidates some
results to update the listing before a jms arrives.
Furthermore, do realize that if your 'list' involves a search, the index
is not yet updated, hence this approach will only work for propfinds,
not for dasl searches. Also, if for example a document is added, you
need to fire an event invalidating the parent node.
At [1] you see at the bottom:
public static void fireEvent(EventAwareManager eventManager, String uri)
{
And
public static void fireEvent(EventAwareManager eventManager, String uri,
boolean existsInRepository) {
In flowscript, you can see for example in explorer.js:
importClass(Packages.org.apache.cocoon.caching.EventAwareManager);
var emanager = cocoon.getComponent(EventAwareManager.ROLE);
WebdavRepository.fireEvent(emanager,uriPrefix+resourceId);
This pretty much should do the job.
Regards Ard
[1]
http://svn.hippocms.org/repos/hippo/hippo-components/hippo-cms-core/trun
k/src/java/nl/hippo/cms/contentmodel/WebdavRepository.java
>
> Dennis
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
>
> Searchable archives can be found at:
> <a href=ttp://hippocms-dev.markmail.org/">MarkMail</a> and <a
> href=ttp://www.nabble.com/Hippo-CMS-f26633.html">Nable</a>.
>
>
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
<a href="http://hippocms-dev.markmail.org/">MarkMail</a> and <a
href="http://www.nabble.com/Hippo-CMS-f26633.html">Nable</a>.