abbysmal / Canopy

A git-blogging unikernel written using MirageOS
ISC License
120 stars 27 forks source link

updates to navbar should invalidate all the timestamps #56

Closed hannesm closed 1 year ago

hannesm commented 8 years ago

(carried over from #55): The timestamp is correct on __blog after updating an article + push, however we still didn't fixed the fact that if a page was cached (relying on it's timestamp), and if you add a page that will show up in the navbar (so, if you add an article at the root of the repo), once you go back to this cached page after the update, the navbar isn't updated (since the cached page rely on the article individual timestamp).

sorry I didn't keep that in my mind while doing any timestamp work @Engil... needs for sure some rethinking of the last_updated dependencies... basically addition/removal of files (or rather directories) should lead to trashing the cache/last-updated...

abbysmal commented 8 years ago

basically addition/removal of files (or rather directories) should lead to trashing the cache/last-updated...

Yeah, that's what I thought. I guess we could do it by getting the list of (irmin) keys for the latest commit coming from the pull, and comparing it to the last head list of keys. If some keys are added/deleted (if the list aren't the same, in the end.), then we drop the cache. To simplify those kind of things, it would probably be nice to move to Irmin's watch mechanism (see https://mirage.github.io/irmin/Irmin.BC.html) instead of manually calling update functions each time we pull new content.

hannesm commented 1 year ago

Thanks for your work on Canopy, @Engil. Since I moved to generating static sites and using unipi, I have no interest in this issue anymore and am closing it.