This project is read-only.


Index Cache File Updating Continuously - with Fix


Hi Zoltán (and Lombiq),

Nice module, been loving it. I just located a (seemingly) bug that is occurring where the index is continually copying down from Blob storage to the local (cached) version on the file server. The issue stems from this file:


Around line 70 I had to change the calculation for cachedLastModifiedUTC to the following:
// EMS CHANGE - start
// cachedLastModifiedUTC was not ouputting with a date (just time) and the time was always off
long unixDate = CacheDirectory.FileModified(fileName);
DateTime start = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
var cachedLastModifiedUTC = start.AddMilliseconds(unixDate).ToUniversalTime();                        
//var cachedLastModifiedUTC = new DateTime(CacheDirectory.FileModified(fileName), DateTimeKind.Local).ToUniversalTime();
// EMS CHANGE - end
In short, the cachedLastModifiedUTC never returned the proper date (there was no date portion and even the time portion was off). I believe the actual conversion from unixTime to C# date didn't work so I implemented one that (I believe) does.

Proud to post the first "issue" - sorry I just found it otherwise would have let you know earlier.
Closed Sep 25, 2014 at 9:46 PM by Piedone
The author applied the fix, and I applied it here. Thanks again!


Piedone wrote Sep 25, 2014 at 9:20 PM

Interesting, thanks for reporting this.

It seems that this was a misunderstanding about the DateTime ctor by the original author. And you can confirm that the date is now right?

Piedone wrote Sep 25, 2014 at 9:20 PM

jao28 wrote Sep 25, 2014 at 9:37 PM

It has been 2-3 days and everything has been working. Thanks for moving it up the chain to AzureDirectory.

LombiqBot wrote Sep 25, 2014 at 9:43 PM

Fixed in changeset 0b0e22d4cb1e