]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Store API and layout polishing. No functionality changes intended.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 19 Nov 2015 05:51:49 +0000 (22:51 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 19 Nov 2015 05:51:49 +0000 (22:51 -0700)
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.

1  2 
configure.ac
src/Makefile.am
src/cache_cf.cc
src/main.cc
src/mem/old_api.cc
src/ssl/helper.cc
src/stat.cc
src/store.cc
src/store_digest.cc
src/tools.cc

diff --cc configure.ac
Simple merge
diff --cc src/Makefile.am
Simple merge
diff --cc src/cache_cf.cc
Simple merge
diff --cc src/main.cc
Simple merge
index 56dcbc679fd8abe10e6b70b410db2494e49eba07,40a05755a5888a5900f733532b1a365dd0336856..6e2b93d38abf42703bd4e209ab434c9cafd3faac
  #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"
Simple merge
diff --cc src/stat.cc
Simple merge
diff --cc src/store.cc
index 837cd57ff28190815a78cec258175a102f0cf867,b5e42419cb8f28529fba5265c26b6ba780a27976..3b22edaab9f318731a60fdaf349fc88872817e79
@@@ -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;
  }
  
Simple merge
diff --cc src/tools.cc
Simple merge