From: Alex Rousskov Date: Thu, 19 Nov 2015 05:51:49 +0000 (-0700) Subject: Store API and layout polishing. No functionality changes intended. X-Git-Tag: SQUID_4_0_3~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc12e84bcedce7d225212499ed6299bc74132b78;p=thirdparty%2Fsquid.git Store API and layout polishing. No functionality changes intended. Fixes "any Store is a Root" API that forced us to bloat the base Store class with methods needed only in Store::Root() Controller. Unblocks bug #7 (cached headers update) fixes. Class renaming and source file movement map: src/SwapDir.h => src/store/Disk.h (and Controller.h) src/SwapDir.cc => src/store/Disk.cc src/StoreHashIndex.h => src/store/Disks.h (and LocalSearch.h) src/store_dir.cc => src/store/Controller.cc (and Disks.cc, LocalSearch.cc) src/disk.* => src/fs_io.* The Store namespace hierarchy now looks like this: * Storage: Any storage. Similar to the old Store class, but leaner. * Controller: Combined memory/disks caches and transients. Root API. * Controlled: Memory cache, disk(s) cache, or transient Storage. * Disks: All disk caches combined. * Disk: A single cache_dir Storage. * Memory: A memory cache. * Transients: Entries capable of being collapsed for CF. Please see merged branch commits for details. --- dc12e84bcedce7d225212499ed6299bc74132b78 diff --cc src/mem/old_api.cc index 56dcbc679f,40a05755a5..6e2b93d38a --- a/src/mem/old_api.cc +++ b/src/mem/old_api.cc @@@ -12,10 -12,11 +12,10 @@@ #include "acl/AclDenyInfoList.h" #include "acl/AclNameList.h" #include "base/PackableStream.h" -#include "CacheDigest.h" #include "ClientInfo.h" - #include "disk.h" #include "dlink.h" #include "event.h" + #include "fs_io.h" #include "icmp/net_db.h" #include "md5.h" #include "mem/forward.h" diff --cc src/store.cc index 837cd57ff2,b5e42419cb..3b22edaab9 --- a/src/store.cc +++ b/src/store.cc @@@ -1519,10 -1450,14 +1450,10 @@@ StoreEntry::negativeCache( void storeFreeMemory(void) { - Store::Root(NULL); + Store::FreeMemory(); #if USE_CACHE_DIGESTS - - if (store_digest) - cacheDigestDestroy(store_digest); - + delete store_digest; #endif - store_digest = NULL; }