##// END OF EJS Templates
Added Single Threshold cache tests cases around limits...
Added Single Threshold cache tests cases around limits Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r12:4e36a737f884
r13:8498c2e83e63
Show More
SingleThresholdCacheStrategy.h
22 lines | 712 B | text/x-c | CLexer
/ include / Variable / SingleThresholdCacheStrategy.h
#ifndef SCIQLOP_SINGLETHRESHOLDCACHESTRATEGY_H
#define SCIQLOP_SINGLETHRESHOLDCACHESTRATEGY_H
#include "Settings/SqpSettingsDefs.h"
#include "VariableCacheStrategy.h"
class SCIQLOP_CORE_EXPORT SingleThresholdCacheStrategy : public VariableCacheStrategy {
public:
SingleThresholdCacheStrategy() = default;
DateTimeRange computeRange(const DateTimeRange &currentCacheRange,
const DateTimeRange &rangeRequested) override
{
Q_UNUSED(currentCacheRange);
if(currentCacheRange.contains (rangeRequested*1.1))
return currentCacheRange;
return rangeRequested*2.;
}
};
#endif // SCIQLOP_SINGLETHRESHOLDCACHESTRATEGY_H