I just spotted this on the Palm Developer forums and figured I'd post about it quickly before I leave for the Dev Con.
Apparently, the developer of McFile has found a "backdoor" method to flush the DB Cache on the T5. I have written previously about the DB Cache, and about how there is no exposed method to clear it. However, this fellow has discovered a way around that limitation. Here is the quote from the Developer Forum:
"Clearing DBCache of TungstenT5 is carrying out by
broadcasting a Notification SysNotifyBroadcastDeferred)
HotSync Start/Finish (sysNotifySyncStartEvent and
sysNotifySyncFinishEvent)."
In short, he has discovered that after a hotsync, the DB Cache gets flushed. So, he has written a small routine to broadcast the hotsync start/finish events. Very clever! For those of you looking for code, your function would look something like this:
void FlushDBCache()
{
SysNotifyParamType notifyParams;
notifyParams.notifyType = sysNotifySyncStartEvent;
notifyParams.broadcaster = sysFileCSystem;
notifyParams.notifyDetailsP = NULL;
notifyParams.userDataP = NULL;
notifyParams.handled = false;
SysNotifyBroadcastDeferred(¬ifyParams, 0);
notifyParams.notifyType = sysNotifySyncFinishEvent;
notifyParams.handled = false;
SysNotifyBroadcastDeferred(¬ifyParams, 0);
}
Now, I don't know if this works on other devices like the unpatched Treo 650, but it does appear to work well on the T5. YMMV.
Disclaimer:
As always, this code is provided free of charge, but if you find it helpful, I'd love to hear about it!
-Jon
|