You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Gabriel Wurzer <wu...@iemar.tuwien.ac.at> on 2005/11/29 08:59:37 UTC

[VFS] directory caching

FileObject internally caches the children - multiple calls to getChildren()
return the same value even if the children on the server have changed. 

 

is this wanted ? I am using NullFilesCache, and I intuitively thought that
this would also concern directory listings. how can I avoid directory
caching ? **

 

cheers

Gabriel

 

 

// ** a dirty solution could be to make the function
removeChildrenFromCache() in AbstractFileObject public , but this seems a
bit clumsy if I have already specified I want no caching (?).

 

 


Re: [VFS] directory caching

Posted by Mario Ivankovits <ma...@ops.co.at>.
HJi Gabriel!
> FileObject internally caches the children - multiple calls to getChildren()
> return the same value even if the children on the server have changed.  
>
> is this wanted ? I am using NullFilesCache, and I intuitively thought that
> this would also concern directory listings. how can I avoid directory
> caching ? **
>   
This is a hot topic and on my todo list for the next release.

For now its best to call
foDirectory.close()
this will clear the children list and refetch it on next getChildren()

And please do not use the NullFilesCache for now as it might lead to 
resource leaks.


Thanks!
---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org