Fix/cache validation - #6108
Conversation
There was a problem hiding this comment.
Pull Request Overview
Fixes a cache invalidation bug where Library.add_album() failed to clear the _memotable cache after adding albums, causing potential stale template data issues.
- Added cache clearing by setting
_memotableto an empty dictionary after album insertion - Updated changelog to document the bug fix
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/changelog.rst | Added changelog entry documenting the cache invalidation bug fix |
| beets/library/library.py | Added cache clearing statement to match behavior in Library.add() method |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Thanks for submitting this PR and your interest in contributing to beets. I took a look at the change and had some questions about the motivation. The original To help us understand, could you please provide:
As your contributions appears to be AI-generated to me, I will take a bit more caution here! Often such PRs "fix" non-existent issues without a clear understanding of the codebase. These can unintentionally introduce bugs. If that's not the case here, I apologize for the assumption, and I look forward to your clarification so we can move forward. |
Description
Fixed cache invalidation bug in
Library.add_album()where the_memotablecache was not cleared after adding albums, unlike theLibrary.add()method. This could lead to stale template cache data when adding albums with multiple items.To Do
docs/to describe it.)docs/changelog.rstto the bottom of one of the lists near the top of the document.)