JoannaaKL
|
28b868dad4
|
Add in memory cache for lockdown mode (#1416)
* Apply lockdown mode to issues and pull requests
* Add cache
* Unlock in defer
* Add muesli/cache2go
* [WIP] Replace custom cache in lockdown.go with cache2go struct (#1425)
* Initial plan
* Replace custom cache with cache2go library
- Added github.com/muesli/cache2go dependency
- Replaced custom map-based cache with cache2go.CacheTable
- Removed manual timer management (scheduleExpiry, ensureEntry methods)
- Removed timer field from repoAccessCacheEntry struct
- Updated GetRepoAccessInfo to use cache2go's Value() and Add() methods
- Updated SetTTL to flush and re-add entries with new TTL
- Used unique cache names per instance to avoid test interference
- All existing tests pass with the new implementation
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Final verification complete
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Use muesli for cache
* Make RepoAccessCache a singleton (#1426)
* Initial plan
* Implement RepoAccessCache as a singleton pattern
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Complete singleton implementation and verification
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Remove cacheIDCounter as requested
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Update mutexes
* .
* Reuse cache
* .
* .
* Fix logic after vibe coding
* Update docs
* .
* Refactoring to make the code pretty
* Hide lockdown logic behind shouldFilter function
* .
* Tests
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
|
2025-11-21 10:34:51 +01:00 |
|