Geoff Howard wrote:
Pretty sure - the code is in cvs:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/eventcache/samples/event.js?rev=1.1&content-type=text/vnd.viewcvs-markup
But this is the whole thing:
var role = Packages.org.apache.cocoon.caching.Cache.ROLE;
function cacheEvent() {
var cache = cocoon.getComponent(role);
var event = new Packages.org.apache.cocoon.caching.validity.NamedEvent("one");
var rand = Math.random() * 10000000000000000000;
cache.processEvent(event);
cocoon.releaseComponent(cache);
cocoon.redirectTo("demo?pageKey=" + cocoon.request.pageKey + "&rand="+rand);
}
Geoff
Reinhard Pötz wrote:
From: Geoff Howard
Christopher Oliver wrote:
Yes. That is a feature of the new FOM: it always creates a session. The
original API had createSession() and removeSession(). Those
functions
were removed from FOM.
I thought that was only supposed to happen after a reference to cocoon.session, or when a continuation is created. Can someone confirm?
Yep. If there is no reference to cocoon.session no session should be
created. So if you get a session if you redirectTo(uri) you discovered an error. One question: Are you sure that you haven't
created a session somewhere else?
Cheers, Reinhard