/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
virtual bool error() const;
virtual bool isDone() const;
- virtual StoreEntry *currentItem();
RefCount<UFSSwapDir> sd;
int n_read;
dirent_t *entry;
DIR *td;
char fullpath[MAXPATHLEN];
- char fullfilename[MAXPATHLEN];
+ char fullfilename[MAXPATHLEN*2];
StoreRebuildData counts;
void rebuildFromDirectory();
void rebuildFromSwapLog();
void rebuildStep();
- void undoAdd();
+ void addIfFresh(const cache_key *key,
+ sfileno file_number,
+ uint64_t swap_file_sz,
+ time_t expires,
+ time_t timestamp,
+ time_t lastref,
+ time_t lastmod,
+ uint32_t refcount,
+ uint16_t flags);
+ bool evictStaleAndContinue(const cache_key *candidateKey, const time_t maxRef, int &staleCount);
int getNextFile(sfileno *, int *size);
- StoreEntry *currentEntry() const;
- void currentEntry(StoreEntry *);
- StoreEntry *e;
bool fromLog;
bool _done;
/// \bug (callback) should be hidden behind a proper human readable name