Skip to content

ManifestStore never evicts cache entries. #77

@sneakers-the-rat

Description

@sneakers-the-rat

After triggering a repository refresh, the git worktree branch got fetched, but there was nothing I could to do make it actually show in frontend.

this bug was caught in review: #50 (comment)

ManifestStore constructs a cache key from its url and the git ref (the branch name): https://github.com/Aharoni-Lab/LabkiPackManager/blob/03ffc8fb230b666290cceeb298f4f865776e7f13/includes/Services/ManifestStore.php#L63

and caches the manifest with an infinite TTL: https://github.com/Aharoni-Lab/LabkiPackManager/blob/03ffc8fb230b666290cceeb298f4f865776e7f13/includes/Services/ManifestStore.php#L127

since neither the repo URL nor the ref (a branch name) will ever change, the cache entry will never be evicted, and the manifest display will never be updated.

using the repo's last_fetched timestamp in the cache key should have fixed the problem, but i had to just resort to hardcoding $refresh=true in the get() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions