3.0.x.x This commit introduces a new cache driver for APCu (APC User Cache).#15189
Merged
mhcwebdesign merged 4 commits intoopencart:3.0.x.xfrom Nov 14, 2025
Merged
3.0.x.x This commit introduces a new cache driver for APCu (APC User Cache).#15189mhcwebdesign merged 4 commits intoopencart:3.0.x.xfrom
mhcwebdesign merged 4 commits intoopencart:3.0.x.xfrom
Conversation
This commit introduces a new cache driver for APCu (APC User Cache).
Reasoning:
APCu is the modern, actively maintained successor to the old APC extension. It provides a significant performance improvement over the default file-based caching mechanism, which is especially beneficial for busy stores. Adding this driver gives store owners with modern server environments a high-performance caching option out-of-the-box.
Implementation Details:
The driver implements all required methods of the cache interface: get, set, delete, and deleteAll.
It properly checks if the apcu PHP extension is loaded before attempting to use it.
It respects the CACHE_PREFIX constant to avoid potential key collisions on shared servers.
The deleteAll method (used for clearing cache by prefix) is implemented efficiently using APCIterator.
Add new APCu cache driver for high-performance caching
Contributor
Author
|
Latest commit includes the requested updates. Thanks for the feedback! |
Contributor
|
@ADDCreative : Can you verify that these latest changes (deleting cache by prefix and wildcards) are now correctly implemented? If they are, I'll do the merge. |
…nality verification - Replaced APCUIterator constructor call with correct signature (pattern + APC_ITER_KEY) - Performed complete end-to-end validation of all cache operations (get/set/delete/clear/list) - Verified stable behavior on PHP 7.4–8.4 with APCu enabled This version represents a final, production-ready implementation of the APCu cache driver based solely on APCUIterator, without any external registry.
Author
Everything has now been fully tested — the iterator fix and wildcard deletion work as expected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reasoning:
APCu is the modern, actively maintained successor to the old APC extension. It provides a significant performance improvement over the default file-based caching mechanism, which is especially beneficial for busy stores. Adding this driver gives store owners with modern server environments a high-performance caching option out-of-the-box.
Implementation Details: