]> git.ipfire.org Git - thirdparty/ccache.git/commit
Improve secondary storage framework
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 16 Jul 2021 20:12:17 +0000 (22:12 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 19 Jul 2021 10:35:22 +0000 (12:35 +0200)
commit873384667a5e8ba0e688303e18f34196ab3b57c6
tree76286cd6b4ee881af19ed94c5f86242568c34c87
parent08b8b5feb810b2474a1a0d3207da889940689d10
Improve secondary storage framework

- Let the secondary storage framework create backend instances on demand and
  track their failure state - the framework will stop calling a backend after a
  connection error/timeout. This makes it possible for a backend to create a
  connection in the constructor if wanted.
- Added API and implementation for redacting secrets in secondary storage URLs
  and attributes. Passwords in URLs are now redacted in debug logs but not for
  "ccache -p" and "ccache -k secondary_storage".
- Adapted existing storage backends to the new APIs. In particular, the Redis
  backend could be simplified.
- Moved the SecondaryStorage class to src/storage/secondary, analogous to
  PrimaryStorage which is in src/storage/primary.
16 files changed:
src/ccache.cpp
src/storage/SecondaryStorage.hpp [deleted file]
src/storage/Storage.cpp
src/storage/Storage.hpp
src/storage/secondary/CMakeLists.txt
src/storage/secondary/FileStorage.cpp
src/storage/secondary/FileStorage.hpp
src/storage/secondary/HttpStorage.cpp
src/storage/secondary/HttpStorage.hpp
src/storage/secondary/RedisStorage.cpp
src/storage/secondary/RedisStorage.hpp
src/storage/secondary/SecondaryStorage.cpp [new file with mode: 0644]
src/storage/secondary/SecondaryStorage.hpp [new file with mode: 0644]
src/storage/types.hpp
test/suites/secondary_http.bash
test/suites/secondary_redis.bash