summaryrefslogtreecommitdiff
path: root/ui-shared.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-05-16 00:58:35 +0200
committerLars Hjemli <hjemli@gmail.com>2007-05-16 00:58:35 +0200
commitf9ff7df613b4ee86fe5914c4ae3400650882c03d (patch)
treec26fde3a4d3485943c275232f18359bebd133f1a /ui-shared.c
parenta2ddc10479ec463708e422ca5ce7ec02c22a7d02 (diff)
downloadcgit-f9ff7df613b4ee86fe5914c4ae3400650882c03d.tar.gz
cgit-f9ff7df613b4ee86fe5914c4ae3400650882c03d.tar.bz2
cgit-f9ff7df613b4ee86fe5914c4ae3400650882c03d.zip
Add support for commitdiff via h parameter
The commitdiff will be generated against the first parent, and the diff page also gets the benefit of repo.defbranch. Cleaned up some bad whitespace in cgit.h while at it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-shared.c')
0 files changed, 0 insertions, 0 deletions
gheader'>2006-12-10Add caching infrastructureLars Hjemli9-28/+353 This enables internal caching of page output. Page requests are split into four groups: 1) repo listing (front page) 2) repo summary 3) repo pages w/symbolic references in query string 4) repo pages w/constant sha1's in query string Each group has a TTL specified in minutes. When a page is requested, a cached filename is stat(2)'ed and st_mtime is compared to time(2). If TTL has expired (or the file didn't exist), the cached file is regenerated. When generating a cached file, locking is used to avoid parallell processing of the request. If multiple processes tries to aquire the same lock, the ones who fail to get the lock serves the (expired) cached file. If the cached file don't exist, the process instead calls sched_yield(2) before restarting the request processing. Signed-off-by: Lars Hjemli <hjemli@gmail.com>