git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE] CGit v0.1-pre

From
LHLars Hjemli <hjemli@gmail.com>
Date
Dec 11, 2006, 08:33 UTC
Message-ID
<8c5c35580612110033y4f6260c9xffeaf4457f4ead21@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0612101653420.12500@woody.osdl.org>
On 12/11/06, Linus Torvalds <torvalds@osdl.org> wrote:
> you really want to re-check the existence after you got the lock,
> otherwise you would race with somebody else that got the lock, generated
> the data, and then unlocked (and you got the lock _after_ the data was
> generated, so now you generate it unnecessarily).
Yes, you're right. Thanks for noticing.

But this also applies to the case where the cachefile has expired, right? In that case, after getting the lock, I have to recheck that the cachefile is _still_ expired.

Anyway, I must say I find it rather unlikely for these cases to occur (frequently) in real life. That would seem to imply that the caching isn't really needed at all.

>
> As a side note: how do you release your caches?
>

Simple timeouts (time()-stat.st_mtime), depending on what kind of page was requested. If anyone cares about invalid cache content (branch head moving), relevant cachefiles can be deleted with an update-hook.

Previous: Linus TorvaldsNext: Lars Hjemli
Message 5 of 12 in “[ANNOUNCE] CGit v0.1-pre”
  1. Lars HjemliDec 10, 2006
  2. Jakub NarebskiDec 11, 2006
  3. MichaelDec 11, 2006
  4. Linus TorvaldsDec 11, 2006
  5. Lars HjemliDec 11, 2006
  6. Lars HjemliDec 11, 2006
  7. Linus TorvaldsDec 11, 2006
  8. Linus TorvaldsDec 11, 2006
  9. Lars HjemliDec 11, 2006
  10. Linus TorvaldsDec 11, 2006
  11. Lars HjemliDec 11, 2006
  12. Jakub NarebskiDec 11, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.