Skip to content

Documentation is unclear about cache-hit's value when the cache misses. #1513

Open
@lima-limon-inc

Description

@lima-limon-inc

In some places it is stated that cache-hit evaluates to the empty string when if fails, notably here:

However this would appear to contradict this other statement:

I am assuming that the latter is a mistake and the former is the intended behavior (mainly based on the comments of the issue linked above). Is this assumption correct or am I missing something?

Is there any specific moment in the codebase where the empty string is returned? I was not able to find it. Do note that I am not too familiar with typescript. AFAIK, it would seem that the only places where cache-hit is set are:

Furthermore, are there any examples in how to handle the case when the cacheHit evaluates to the empty string? I could only find examples where that variable is tested for "true" or "false".

Thanks in advance!

Activity

added 2 commits that reference this issue on Dec 11, 2024
bfb79cc
63d8658
lima-limon-inc

lima-limon-inc commented on Apr 16, 2025

@lima-limon-inc
Author

Btw, I have opened a PR to update the documentation to reflect this behavior: #1514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @lima-limon-inc

      Issue actions

        Documentation is unclear about `cache-hit`'s value when the cache misses. · Issue #1513 · actions/cache