nolibc / migi

An open-source, minimal static site generator written in Rust.
1 stars 0 forks source link

Update cache #6

Closed EldestHedge closed 1 year ago

EldestHedge commented 1 year ago

Cache does not update files based on time, only file name. Files with the same name removed and then added back to content are not re cached.

Potential solution: concatenation of file name and date modified or assigning UUID

nolibc commented 1 year ago

I am unable to reproduce the behavior we believe to have observed yesterday regarding this issue.

Furthermore, as of commit 742bfba3d5dafb310a2baaf0ebe0037af21b0eb9, Migi already ensures the above cannot be an issue as seen on line 47 in the src/cache.rs file.

There is a check for the name of the file in cache and in the event that the file name is in cache, Migi does not simply move on to checking the next file (which would in turn lead to the described issue). Instead, after verifying that the file in question is indeed cached, it does another check of the file modified date. This second check ensures that this cannot be an issue as deleting and creating a file of the same name will still affect its date modified.