Get a share's last indexed time

johnwait

16-04-2012 09:57:44

Hi all,

If anybody is still reading this forum, I'm looking for a way to retrieve a share's last indexed timestamp (to be sent to the client), although from what I found it's not (currently) possible.

I know it can be found in the "shares.xml" file, but the value's not being updated/committed while the server is running so it's effectively useless. It's not found found in either of the SQLite databases. And I studied the various server interfaces exposed through the SpiderMonkey vm, and from what I found no method is exposed that would allow to get the last indexed time of a share.

Basically, I'm currently optimizing JSON queries, and I'm at a point where I want to implement a JSON cache on the user side for indexed file records (that would probably sit between vibe.util.JsonLoader() and Ext.Ajax.request(), or rather create something like a vibe.util.JsonCachedLoader() to be used exclusively for index queries, so as not to affect other requests like getting current users & server status). I'm already splitting request responses using paged queries to avoid Ext.Ajax timeouts, and implemented JSON hpack-ing on both sides. Of course, I could use a expiration time for cache entries, but knowing when a share was last indexed could avoid unnecessary cache refresh (or allow for quicker ones if a share was just re-indexed). For example, if available it could be sent along through "resources/ajax/get-status.vibe" (well, one timestamp for each share, and along with the current server time so as to compute and negate any time/timezone difference between the server & client).

Anyway, like I said, unless I missed something it's definitively not there. It would then need to be somehow implemented in the next release, which probably means the day after never.

Regards,

Jonathan