Skip to content

Bundle-info cache can be refilled with stale data after a session invalidates it #44

Open

Description

@Hiczownik

Where: src/FileHolder.Infrastructure/Services/FileGroupService.cs:295

A cache refill that reads the group just before OpenSessionAsync commits (IsDeleted = true) and calls RemoveAsync writes the stale group back after the removal. For up to 5 minutes visitors see an available bundle with downloads left and get 410 when they click.

Suggested fix: use a version or generation stamp checked before writing to the cache, or keep the cache time very short for groups near their limits.

Found during a code review of the whole src tree.

Activity

  1. added
    bugSomething isn't working
    backend.NET API and services
    downloadDownloading and saving files
    P3Priority 3: minor or cosmetic
    on Oct 20, 2026
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

    P3Priority 3: minor or cosmeticbackend.NET API and servicesbugSomething isn't workingdownloadDownloading and saving files

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions