onCacheHit method
Implementation
void onCacheHit(Hit hitToBeCached) {
hitToBeCached.id =
hitToBeCached.visitorId + "_" + FlagshipTools.generateUuidv4();
if (hitToBeCached.type != HitCategory.CONSENT) {
failedIds.add(hitToBeCached.id);
}
var bodyToCache = hitToBeCached.bodyTrack;
if (hitToBeCached.createdAt != null) {
bodyToCache.addEntries(
{"createdAt": hitToBeCached.createdAt.toString()}.entries);
}
fsCacheHit?.cacheHits({hitToBeCached.id: bodyToCache});
}