[llvm] [CAS] Add UnifiedOnDiskCache and OnDiskCAS (PR #114103)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 10:02:05 PDT 2025
================
@@ -215,9 +223,39 @@ class ObjectStore {
return Data.size();
}
+ /// Set the size for limiting growth of on-disk storage. This has an effect
+ /// for when the instance is closed.
+ ///
+ /// Implementations may be not have this implemented.
+ virtual Error setSizeLimit(std::optional<uint64_t> SizeLimit) {
+ return Error::success();
+ }
+
+ /// \returns the storage size of the on-disk CAS data.
+ ///
+ /// Implementations that don't have an implementation for this should return
+ /// \p std::nullopt.
+ virtual Expected<std::optional<uint64_t>> getStorageSize() const {
+ return std::nullopt;
+ }
+
+ /// Prune local storage to reduce its size according to the desired size
+ /// limit. Pruning can happen concurrently with other operations.
+ ///
+ /// Implementations may be not have this implemented.
----------------
bogner wrote:
```suggestion
/// Implementations may leave this unimplemented.
```
https://github.com/llvm/llvm-project/pull/114103
More information about the llvm-commits
mailing list