Skip to content

[core/gitstore] refactor gitstore and using expirable.LRU - #145

Merged
dungdm93 merged 5 commits into
mainfrom
refactor-gitstore
Sep 8, 2026
Merged

[core/gitstore] refactor gitstore and using expirable.LRU#145
dungdm93 merged 5 commits into
mainfrom
refactor-gitstore

Conversation

@dungdm93

@dungdm93 dungdm93 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Refactor gitstore.manager repository cache using github.com/hashicorp/golang-lru/v2/expirable.
  • Set default cache capacity to 100 repositories and TTL to 24 hours.
  • Add functional Option helpers (WithSize, WithTTL) to configure the cache.
  • Ensure eviction callback closes repository storers to release file descriptors and packfiles.
  • Migrate gitstore unit tests to testify/suite (ManagerTestSuite and RepositoryTestSuite) using s.T().Context().
  • Add test cases covering cache options, LRU capacity eviction, and TTL expiration.

@dungdm93 dungdm93 changed the title [core/gitstore] refactor repo caching using expirable LRU and migrate tests to testify suite [core/gitstore] refactor gitstore and using expirable.LRU Sep 8, 2026
@dungdm93
dungdm93 merged commit daf4479 into main Sep 8, 2026
2 checks passed
@dungdm93
dungdm93 deleted the refactor-gitstore branch September 8, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant