-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(GCS): Update
CustomTime
metadata field at cache entry hits
This commit introduces the architectural support for implementing a cache-provider-specific routine that updates an `atime`-like (access time) timestamp every time a cache entry is successfully hit. Several cloud providers implement such semantics under different names and APIs, most commonly for the purpose of providing a better time-out and culling mechanism. The logic in _sccache_ only performs the bookkeeping of this information. With this feature, it is possible to give the necessary inputs to the cloud provider's lifecycle routines to allow keeping cloud costs and size low by culling cache objects that had not been hit for a set amount of time. Added the support for the aforementioned logic specifically for the GCS cache implementation, where the custom access time medata is available under the `CustomTime` attribute, which can be bumped only ever forward in time. In case a bumping is unsuccessful (due to clocks getting out-of-synch), the error is silently discarded.
- Loading branch information
1 parent
c719e5a
commit 55706e9
Showing
7 changed files
with
407 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.