[fbreader] Added ZLFile::flushCache
This commit is contained in:
parent
b6a5dd4576
commit
94af49b211
2 changed files with 11 additions and 0 deletions
|
@ -55,6 +55,16 @@ void ZLFile::initCache() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void ZLFile::flushCache() {
|
||||
#if FBREADER_THREAD_LOCAL_ZLFILE_PLAIN_STREAM_CACHE
|
||||
ZLFilePlainStreamCache *cache = (ZLFilePlainStreamCache*)pthread_getspecific(plainStreamCacheKey);
|
||||
if (cache) {
|
||||
delete cache;
|
||||
pthread_setspecific(plainStreamCacheKey, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ZLFile::ZLFile() : myMimeTypeIsUpToDate(true), myInfoIsFilled(true) {
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ public:
|
|||
|
||||
public:
|
||||
static void initCache();
|
||||
static void flushCache();
|
||||
static std::string fileNameToUtf8(const std::string &fileName);
|
||||
static std::string replaceIllegalCharacters(const std::string &fileName, char replaceWith);
|
||||
|
||||
|
|
Loading…
Reference in a new issue