Add TTL support for function caching#70
Merged
humoflife merged 5 commits intocrossplane-contrib:mainfrom Aug 20, 2025
Merged
Conversation
Signed-off-by: Steven Borrelli <steve@borrelli.org>
Signed-off-by: Steven Borrelli <steve@borrelli.org>
humoflife
reviewed
Aug 12, 2025
Collaborator
There was a problem hiding this comment.
cacheTTL functionality is working. However, it appears that with --enable-function-response-cache flag enabled, function-shell with cacheTTL is called every 2 * cacheTTL versus every cacheTTL. When using the default of 1 minute per function-sdk, the function is called once every 2 minutes.
Member
Author
|
@humoflife I can check if we are computing the TTL incorrectly |
Signed-off-by: Steven Borrelli <steve@borrelli.org>
Member
Author
|
I was testing timing in crossplane/crossplane#6718, and it seems to be working correctly on the Crossplane side. In any case, the function is setting the TTL correctly even if crossplane is computing deadlines incorrectly. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
In Crossplane 1.20, the ability via PR crossplane/crossplane#6422 to cache function outputs was added as an alpha feature with the flag
--enable-function-response-cacheThis PR implements setting the TTL via the input using the
cacheTTLfield.Fixes #
I have:
contribution process. Also see docs.