Skip to content

Add removeItems(pattern) for regex-based granular cache invalidation#48

Merged
voku merged 10 commits into
masterfrom
copilot/add-remove-items-with-regex
Apr 24, 2026
Merged

Add removeItems(pattern) for regex-based granular cache invalidation#48
voku merged 10 commits into
masterfrom
copilot/add-remove-items-with-regex

Conversation

Copilot AI commented Apr 23, 2026

Copy link
Copy Markdown
Contributor
  • Understand the problem and all three adapters
  • Write failing tests first (TDD red) — FileCacheTest, FileSimpleCacheTest, OpCacheTest, MemcacheCacheTest
  • Fix AdapterFileAbstract::getAllKeys() — scan directory with self::CACHE_FILE_PREFIX + self::CACHE_FILE_SUBFIX
  • Override AdapterOpCache::getAllKeys() — scan for __simple_KEY.php files (overrides .php.cache extension)
  • Fix AdapterMemcache::getAllKeys() — in-backend key registry; set/setExpired/remove maintain it; removeAll (flush) implicitly clears it
  • Fix AdapterXcache::getAllKeys() — same registry pattern via xcache_get/xcache_set
  • All 199 tests pass; only 8 pre-existing Memcached failures; PHPStan clean

This change is Reviewable

Copilot AI linked an issue Apr 23, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add removeThose function for regex based cache invalidation Add removeItems(pattern) for regex-based granular cache invalidation Apr 23, 2026
Copilot finished work on behalf of voku April 23, 2026 21:32
Copilot AI requested a review from voku April 23, 2026 21:32
Copilot AI and others added 2 commits April 23, 2026 22:14
…licitly document registry keys in tests

Agent-Logs-Url: https://github.com/voku/simple-cache/sessions/fc67b1f9-b013-4989-b66b-c27cc43b427c

Co-authored-by: voku <264695+voku@users.noreply.github.com>
Copilot finished work on behalf of voku April 23, 2026 22:56
@voku voku marked this pull request as ready for review April 23, 2026 22:57
…, CacheChain, Cache accessors

Agent-Logs-Url: https://github.com/voku/simple-cache/sessions/56b7f764-8570-47ac-be45-a8eb8262b316

Co-authored-by: voku <264695+voku@users.noreply.github.com>
Copilot finished work on behalf of voku April 23, 2026 23:17
…rMemcache, AdapterXcache

Agent-Logs-Url: https://github.com/voku/simple-cache/sessions/27bb5fa7-f524-45c8-9687-3bf86173f331

Co-authored-by: voku <264695+voku@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
13.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copilot finished work on behalf of voku April 23, 2026 23:59
@voku voku merged commit 20b1728 into master Apr 24, 2026
18 of 20 checks passed
Copilot AI mentioned this pull request Apr 24, 2026
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.

Remove items with regex?

3 participants