gitweb/lib - Regenerate entry if the cache file has size of 0
commit93464ea4b4f0f573740bed91d0f2a1da9c1fe512
authorJakub Narebski <jnareb@gmail.com>
Sun, 5 Dec 2010 20:48:50 +0000 (5 21:48 +0100)
committerJakub Narebski <jnareb@gmail.com>
Sun, 5 Dec 2010 20:48:50 +0000 (5 21:48 +0100)
treeb3ed86ed6ba74bf4ddd50349ead930ed82e8d797
parent6e0c7b7ff9c35ee59d30a6785a240186d0f3ac39
gitweb/lib - Regenerate entry if the cache file has size of 0

If the file representing cache entry has size 0 (in bytes), the cache
entry is considered invalid, regardless of its freshness, even if cache
expiration is turned off.

[jh: This is a quick, and thankfully easy, check to regenerate the
cache if the resulting file is of size 0.  This *SHOULDN'T* happen,
but it is possible that it could and thus adding the check.]

Based-on-commit-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
gitweb/lib/GitwebCache/SimpleFileCache.pm