gitweb/lib - No need for File::Temp when locking
commit95f1acf59d10eb63cf4990220a3e1de5615fb4a9
authorJakub Narebski <jnareb@gmail.com>
Sun, 5 Dec 2010 23:01:08 +0000 (6 00:01 +0100)
committerJakub Narebski <jnareb@gmail.com>
Sun, 5 Dec 2010 23:01:08 +0000 (6 00:01 +0100)
treeb7cbea98a9221f018b6cf9c7eac19afbc86d219f
parentdc6d39c9b9432f02a03a7aaabc5cb2feb9c19b9a
gitweb/lib - No need for File::Temp when locking

When using locking to ensure that only one process is generating data
and updating cache, there is no need to use File::Temp for temporary
file.  This should improve performance.

The _tempfile_to_path subroutine got promoted to _tempfile_to_path
method, because we want to choose correct one dynamically, based on
the type of object (polymorphism).

Idea-inspired-by-code-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
gitweb/lib/GitwebCache/FileCacheWithLocking.pm
gitweb/lib/GitwebCache/SimpleFileCache.pm