Skip to content

flush_group optimization#111

Open
nickchomey wants to merge 2 commits into
OllieJones:trunkfrom
nickchomey:flush-group-optimization
Open

flush_group optimization#111
nickchomey wants to merge 2 commits into
OllieJones:trunkfrom
nickchomey:flush-group-optimization

Conversation

@nickchomey
Copy link
Copy Markdown
Contributor

removed redundant loop and unnecessary variable.

added optional capability to only clear a group from apcu, rather than whole thing

dont wipe $this->not_in_persistent_cache at end

Copilot AI review requested due to automatic review settings March 30, 2026 04:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves group flushing behavior in the SQLite object-cache drop-in by making APCu eviction more targeted and simplifying the in-memory group flush logic.

Changes:

  • Add an optional $group_prefix parameter to apcu_clear_cache() to support clearing a subset of APCu entries.
  • Update flush_group() to clear only the relevant APCu entries and remove a redundant “collect then unset” loop.
  • Stop resetting $this->not_in_persistent_cache at the end of flush_group().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread assets/drop-in/object-cache.php
Comment thread assets/drop-in/object-cache.php
@nickchomey
Copy link
Copy Markdown
Contributor Author

copilot made good points about the double loop. i reverted that change, but some of the changes still valid

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.

2 participants