Purging cache for selected folder

General Discussion of Scripting for Adobe Bridge

Moderators: Tom, Kukurykus

patrucci

Purging cache for selected folder

Post by patrucci »

Hi,

I'm working on a script which should purge folder cache when a folder is selected in a Folders pane. I want to be sure that my cache is "up to date" because we're working on images through LAN. Here's the script:

if( BridgeTalk.appName == "bridge" ) {

var thumbHandler = function( event ) {
if (event.type == "select") {
var tnPath = app.document.thumbnail.path;
app.purgeFolderCache(tnPath);
return {handled:false};
}
}

app.eventHandlers.push ({handler:thumbHandler});

}

What really happens is:
1. cache is purged when I active Bridge application (I think that's OK...)
2. cache is purged when I select thumbnail in Content pane
3. cache is not purged when I select "node" in Folders pane

Cache should only be purged when "node" in Folders pane is selected. What I made wrong?