Skip to content

Digest cache grows without bound (no pruning) #97

Closed

Description

@rossigee

Problem

CacheDao / CacheDatabase only ever does INSERT OR REPLACE and a full DELETE FROM cacheentry on "Clear Cache".

There is no automatic pruning of old entries by age, count, or size.

See:

  • CacheDao.java (only insert, get*, clear, counts)
  • DigestCache.java
  • MainViewModel (diagnostics run on every launch)

Impact

  • Database file grows forever on long-lived installs
  • getUniqueCount() / diagnostics become slower over time
  • "Clear Cache" is the only way to reclaim space (destructive)

Suggested

  • Add a prune method (e.g. keep last N entries, or entries newer than X days)
  • Run prune on app start / after sync (with a reasonable limit)
  • Expose "Prune old cache" as a non-destructive menu option

Label: tech-debt,backlog

Activity

  1. added a commit that references this issue on Oct 6, 2026
  2. rossigee commented on Oct 6, 2026

    @rossigee
    OwnerAuthor

    Fixed in #99 (merged).

  3. rossigee commented on Oct 6, 2026

    @rossigee
    OwnerAuthor

    Fixed in #99 (merged).

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions