[darcs-users] "Static Gitit" site.
Gwern Branwen
gwern0 at gmail.com
Tue Apr 21 16:47:33 UTC 2009
On Tue, Apr 21, 2009 at 3:59 AM, Daniel Carrera
<daniel.carrera at theingots.org> wrote:
> Gwern Branwen wrote:
>>
>> What would this post-hook mode of operation be? A combination of a
>> SIGUSR1 hook and a disabling of cache-freshness-checking-on-reads?
>
> Here is one thing I don't understand: Why do we need hooks at all? Darcs
> itself will make sure that the files in the directory tree are updated. All
> you need for that is to make sure that people can't edit the tree other than
> through Darcs (and you'd want that anyways for security). So gitit should
> not need to interact with Darcs at all when serving pages. Just look at the
> actual file in the file system and its timestamp.
Gitit uses filestore, and filestore aims at multiple backends. For
example, what's the timestamp for files - when the backend is sqlite3?
Perhaps there *is* some way to query sqlite3 as to the last date a
'file' was modified. But then there are other issues; for example,
filestore only lets you see recorded files and changes. If I cd into
my wiki directory, and rm -rf everything except _darcs, but I don't do
any darcs record, Gitit chugs on blissfully unaware - it's always
doing 'darcs query contents file', not 'cat file'. But if it was
calling ls on each page read, then caching will be messed up (at the
least).
> Gitit would still have to interact with Darcs for writing and for history.
> But these operations are much rarer than reads.
>
> Daniel.
--
gwern
More information about the darcs-users
mailing list