DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20682

Generator "directory": "dateFormat" is buggy

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CLOSED                      |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From [EMAIL PROTECTED]  2003-06-12 16:25 -------
The behaviour described seems to be due to an error of the caching
algorithm. It cannot always be reproduced. After some testing I
found a solution to this and other similar problems.
However, as a cocoon newbie I do not really know the
new Cocoon caching mechanism. So my "solution" could be
wrong.

The method getValidity is called twice for a single
document (I dont't know why). In the current implementation
these two calls deliver two different validity objects. 
The first one contains an empty file list, the second one
contains the correct file list. Whenever a file or directory
is modified, Cocoon deletes the second validity object
and uses the first one for further testing. As the file
list is empty, isValid always returns 1. Thus, further changes
are not regognized.

My solution is to return the same validity object
for all getValidity calls sent to an DirectoryGenerator object:

public SourceValidity getValidity()
{
  if (this.validity == null)
    this.validity = new FilesValidity(this.refreshDelay);
  return this.validity;
}

Reply via email to