Network file system plugin caching questions

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
akopalsky
Junior Member
Junior Member
Posts: 48
Joined: 2012-10-10, 15:25 UTC

Network file system plugin caching questions

Post by *akopalsky »

I am working on Google Drive plugin (alpha release will be ready very soon) and I have few caching related questions (these questions should probably be addressed by every network file system plugin).

(Q1)
FsFindFirst - FsFindNext are called each time user changes directory. It is very ineffective (and slow) to reload the whole directory each time. I am currently caching directories the user already visited, but I do want to reload the directory if user tries to refresh (Ctrl-R). What is the correct way to detect if I need to load the listing from cache or refresh the cache?

(Q2)
I am willing to implement upload caching mechanism (e.g. uploaded files will be stored locally and uploaded in background) - the user will not see the actual upload process. What are the best practices for implementing jobs which might not finish during regular TC plugin load scope?

Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately there is currently no mechanism to handle this. Maybe just add a pseudo file "<Reload>", as I do in Network Neighborhood? Make sure to skip such files and just return OK when the user tries to download or delete them.
Author of Total Commander
https://www.ghisler.com
Post Reply