gitweb/lib - Configure running 'generating_info' when generating data
commitb7bd7cb929b8f1d4e97d4e9e4fbdb4bdb3c797bb
authorJakub Narebski <jnareb@gmail.com>
Sun, 5 Dec 2010 23:01:09 +0000 (6 00:01 +0100)
committerJakub Narebski <jnareb@gmail.com>
Sun, 5 Dec 2010 23:01:09 +0000 (6 00:01 +0100)
tree110e7eb213d62fedef4ce9d21671683e8292e9ce
parent48679f7985ccda16dc54fda97790841bab4a0ba2
gitweb/lib - Configure running 'generating_info' when generating data

Add a new 'generating_info_is_safe' cache option; if true, then
process generating data (one that acquired exclusive writer's lock)
would run 'generating_info' if there is no stale data and background
cache generation is enabled.

If function generating (or printing) exits, which leads to cache entry
not being generated (for gitweb this means that there are pages which
are not cached, i.e. error pages), and 'generating_info' also exits,
this could result in bad behavior.  Therefore this new option is false
by default.

Updates t9503 test appropriately.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
gitweb/lib/GitwebCache/FileCacheWithLocking.pm
t/t9503/test_cache_interface.pl