Pending

User tests: Successful: Unsuccessful:

avatar c-schmitz
c-schmitz
8 Jul 2026

Pull Request resolves #48061 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Memcached can't list its own keys, so Joomla tracks cached items in a single permanent -index entry. store() append a new index record on every write (including every time a module's cache was regenerated after expiry), so the index grew unbounded. Once it passes Memcached's 1 MB item-size limit, index writes were silently dropped, and any items cached afterward were no longer tracked.

Clearing the cache does not work: The admin Clear Cache list and delete (getAll() / clean()) only act on the index. The untracked items are basically invisible, so they can't be removed

Only restarting Memcached helps because it is a full flush, which wipes everything regardless of the index.

Testing Instructions

This is hard to test since you need to hit the Memcached index limit. For example we have thousands of articles in our website, combined with a short cache time you should be able to exhaust the index space at some point to exhibit the bug.
If you are sure that the index is exhausted change a setting in one of your cache modules, then clear the Joomla cache manually.
You will notice that the module will not exhibit the changed setting, at least not until the normal caching time expires, no matter how many times you clear the cache.

Actual result BEFORE applying this Pull Request

Cached entries when using memcached won't be properly cleared on cache purge.

Expected result AFTER applying this Pull Request

Cached entries will be properly purged.

I also took the liberty to remove the (Experimental) tag on Memcached .- it has been there for 14 years.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar c-schmitz c-schmitz - open - 8 Jul 2026
avatar c-schmitz c-schmitz - change - 8 Jul 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jul 2026
Category Administration Language & Strings Libraries
avatar c-schmitz
c-schmitz - comment - 8 Jul 2026

The PR can also easily be cherry-picked to newer versions.

avatar richard67 richard67 - change - 9 Jul 2026
Title
Fix When using Memcached as cache, clearing the cache in Joomla won't properly clear out the items in Memcache after a while
{5.4] Fix When using Memcached as cache, clearing the cache in Joomla won't properly clear out the items in Memcache after a while
avatar richard67 richard67 - edited - 9 Jul 2026
avatar richard67
richard67 - comment - 9 Jul 2026

@c-schmitz Are the changes in the language strings (removal of " (Experimental)") intentional?

Your PR description doesn't mention them, and to me it seems unrelated to this PR.

And it could be that the language string changes are not possible in a patch version (i.e. 5.4.x or 6.1.x) due to semantic versioning.

Do your code changes really change the status of Memcached support from experimental to stable?

Or might there be other reasons for the experimental status?

If that is not really clear, I would suggest that you revert the language string changes so only your code changes will remain in this PR.

avatar brianteeman
brianteeman - comment - 9 Jul 2026

@richard67 the pr is in response to #48061 - I wouldnt have a problem dropping the word "experimental"

avatar richard67 richard67 - change - 9 Jul 2026
The description was changed
avatar richard67 richard67 - edited - 9 Jul 2026
avatar richard67
richard67 - comment - 9 Jul 2026

@richard67 the pr is in response to #48061 - I wouldnt have a problem dropping the word "experimental"

Then this PR should have been linked to that issue by using Pull Request resolves #48061 . like our pull request template suggests to do.

@c-schmitz I've allowed myself to do that for you.

If the language string changes are ok or not I will clarify with maintainers and report back.

avatar richard67 richard67 - change - 9 Jul 2026
The description was changed
avatar richard67 richard67 - edited - 9 Jul 2026
avatar brianteeman
brianteeman - comment - 9 Jul 2026

if needed the existing language strings can be marked as deprecated an new language strings used here. Probably the best option anyway as translations take a while to catch up and it does "significantly change the meaning" of the string

avatar HLeithner
HLeithner - comment - 10 Jul 2026

Thanks for your pr. Your solution seems to delay the problem but doesn't solve it. If your cache grows more then 1mb active index items you have the same problem again. The solution would be to split the index into multiple entries if it reaches the magic 1mb limit.

avatar tecpromotion tecpromotion - change - 10 Jul 2026
Title
{5.4] Fix When using Memcached as cache, clearing the cache in Joomla won't properly clear out the items in Memcache after a while
[5.4] Fix When using Memcached as cache, clearing the cache in Joomla won't properly clear out the items in Memcache after a while
avatar tecpromotion tecpromotion - edited - 10 Jul 2026
avatar c-schmitz
c-schmitz - comment - 21 Jul 2026

Thank you for the feedback. I will make a further amendment to counter this issue.

Thanks for your pr. Your solution seems to delay the problem but doesn't solve it. If your cache grows more then 1mb active index items you have the same problem again. The solution would be to split the index into multiple entries if it reaches the magic 1mb limit.

Add a Comment

Login with GitHub to post a comment