Skip to content

Conversation

@cachemeifyoucan
Copy link

Introduce ActionCache which can be used together with a CAS to cache
computation results with a key.

@cachemeifyoucan
Copy link
Author

Finish the ActionCache implementation. This is an simplified version (intentionally) from Duncan's scratch: #4715

Currently only support CASID -> CASID mapping and the key value storage is from HashValue -> HashValue. Please check interface and all the TODO in added the code for some of the concerns of initial version.

I will start to remove the ActionCache from CASDB and rename CASDB next.

@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-ActionCache branch 2 times, most recently from e7f0fdb to e5c073f Compare August 22, 2022 21:28
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test

2 similar comments
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we made this public, we could potentially avoid needing to pass both a CAS and an ActionCache everywhere. It seems like to use the cache you are already tied to using a specific CAS since otherwise the ObjectRef won't make sense. WDYT?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't really work unless we make ActionCache owns CAS, otherwise this is going to open to all kinds of life time issues.

@cachemeifyoucan
Copy link
Author

@swift-ci please test

Introduce ActionCache which can be used together with a CAS to cache
computation results with a key.
Distinguish errors and cache misses when calling ActionCache::get
method.
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan merged commit 815db64 into swiftlang:experimental/cas/main Aug 25, 2022
cachemeifyoucan added a commit to cachemeifyoucan/llvm-project that referenced this pull request Aug 30, 2022
Introduce ActionCache which can be used together with a CAS to cache
computation results with a key.
cachemeifyoucan added a commit to cachemeifyoucan/llvm-project that referenced this pull request Aug 30, 2022
Introduce ActionCache which can be used together with a CAS to cache
computation results with a key.
cachemeifyoucan added a commit that referenced this pull request Aug 30, 2022
Introduce ActionCache which can be used together with a CAS to cache
computation results with a key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants