Skip to content

Commit fe41d60

Browse files
committed
Use unsafe isCachedObjectValid with CheckObjValidityEnabled
If the ccdbManager.setLocalObjectValidityChecking() was set, then the method ccdbManager.isCachedObjectValid(path, timestamp) will use only cached object (if any) SOV and EOV to check its validity. By defaults the timestamp of cache filling and Cache-Valid-Until timestamp accounting for the possible overlap of objects validity
1 parent 6db13a9 commit fe41d60

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CCDB/include/CCDB/BasicCCDBManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ class CCDBManagerInstance
147147
if (!isCachingEnabled()) {
148148
return false;
149149
}
150-
return mCache[path].isCacheValid(timestamp); // use stricter check
151-
// return mCache[path].isValid(timestamp);
150+
return (mCheckObjValidityEnabled && mCache[path].isValid(timestamp)) || mCache[path].isCacheValid(timestamp); // use stricter check
152151
}
153152

154153
/// check if checks of object validity before CCDB query is enabled
@@ -264,6 +263,7 @@ T* CCDBManagerInstance::getForTimeStamp(std::string const& path, long timestamp)
264263
cached.objPtr.reset(ptr);
265264
}
266265
cached.uuid = mHeaders["ETag"];
266+
267267
try {
268268
if (mHeaders.find("Valid-From") != mHeaders.end()) {
269269
cached.startvalidity = std::stol(mHeaders["Valid-From"]);

0 commit comments

Comments
 (0)