cachehitrate
implies a rate but is used as a boolean flag
#3
Labels
refactoring
Restructuring for better intelligibility
The
cachehitrate
parameter inRequestedFiles_HitrateBased
is currently used as a boolean despite being an integer.lapis.caching/lapis/caching/files.py
Lines 86 to 98 in 8f4f614
Since the meaning of a rate implies a percentage, this either needs a renaming or checking if the application of
cachehitrate
in terms of a rate does not change expectation, e.g. in theHitrateStorage
andFileBasedHitrateStorage
implementation.Here the
cachehitrate
is used in two different ways,transfer
method forFileBasedHitrateStorage
lapis.caching/lapis/caching/storageelement.py
Lines 361 to 367 in 8f4f614
find
method forFileBasedHitrateStorage
lapis.caching/lapis/caching/storageelement.py
Line 377 in 8f4f614
transfer
forHitrateStorage
(however, this class is out of date already)lapis.caching/lapis/caching/storageelement.py
Line 285 in 8f4f614
As the current implementation already ensures correct functioning also with rates, I would propose to actually interpret it as it is named already. This means the following should be done:
The text was updated successfully, but these errors were encountered: