Ard Schrijvers wrote:
Hello,

regarding the cache-expires and async thing in the cachingsource block, there 
are some things that are strange and seem bugs to me:

1) The expires value is always -1 (eternal), no matter what you define in the queryString. You can see this happen in getSource of the CachingSourceFactory. I think the
if (name.startsWith("cocoon:cache")) {
                    params.setParameter(name.substring("cocoon:".length()), 
sp.getParameter(name));
                    remainingParameters.removeParameter(name);
   }

should also get an else:

else{
    params.setParameter(name,sp.getParameter(name));
}

This if statement checks if a parameter starts with "cocoon:cache" and if yes, it add it to the params object and removes it from the "normal" request parameters. It looks fine for me and the expires value is set correctly at the source AFAICS. BTW, I'm working on trunk.


because all parameters are neglected in the current way.
Then, when I do have my expires accounted for correctly, I do not understand 
why while the cached object is not expired, there is still a call for the 
remote source. This doesn't make sense to me. Also, when the expires is set 
correctly, and the object is expired, I am getting a NullPointerException, but 
it might be because we use an old version...?

I can confirm this but don't know where those requests come from. I could be caused by a validity check but that's only a wild guess.

--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                       web(log): http://www.poetz.cc
--------------------------------------------------------------------

Reply via email to