Feature PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
23 Nov 2025

Pull Request for Issue #45403.

Summary of Changes

Cache Control: allow caching for Content views: articles, categories etc

Testing Instructions

Check browser dev. console network tab for the response for the page HTML of any article.
Also check that Content views works as before.

Actual result BEFORE applying this Pull Request

There is cache-control with no-store, no-cache ...

Expected result AFTER applying this Pull Request

There is no cache-control

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org: TBD
  • No documentation changes for manual.joomla.org needed
avatar Fedik Fedik - open - 23 Nov 2025
avatar Fedik Fedik - change - 23 Nov 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Nov 2025
Category Front End com_content
avatar Fedik Fedik - change - 23 Nov 2025
Labels Added: Feature PR-6.1-dev
avatar Fedik Fedik - change - 23 Nov 2025
The description was changed
avatar Fedik Fedik - edited - 23 Nov 2025
avatar Fedik Fedik - change - 23 Nov 2025
The description was changed
avatar Fedik Fedik - edited - 23 Nov 2025
avatar alikon
alikon - comment - 23 Nov 2025

before pr

image

with pr no cache-control

image

with firefox 145.0.1

avatar alikon alikon - test_item - 23 Nov 2025 - Tested successfully
avatar alikon
alikon - comment - 23 Nov 2025

I have tested this item ✅ successfully on 071936c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46486.

avatar HLeithner
HLeithner - comment - 23 Nov 2025

looks like the wrong approach for the linked issue. Also could lead to unexpected caching on frontend proxies for random content for example in random image module.

my suggestion would be to remove the no-store from the default caching policy and only add it if the user is logged in.

avatar gilbertococchi
gilbertococchi - comment - 23 Nov 2025

+1 about what @HLeithner said.

@alikon I am not saying that Caching article would be a bad thing, but in order to make Joomla pages BFCache elgible it would be sufficient to remove only no-store, leaving the rest unchanged as default.

avatar Fedik
Fedik - comment - 26 Nov 2025

Currently we have only On/Off option for caching and nothing in between.

When we remove no-store we will lose possibility to really prevent the caching. This is not an option without bigger changes in Application class.

What I suggest is to allow the cache for all "static views" (article listing, categories etc).
When any extension want to prevent it then they always can switch it Off with $app->allowCache(false).

avatar HLeithner
HLeithner - comment - 26 Nov 2025

Currently we have only On/Off option for caching and nothing in between.

When we remove no-store we will lose possibility to really prevent the caching. This is not an option without bigger changes in Application class.

What I suggest is to allow the cache for all "static views" (article listing, categories etc). When any extension want to prevent it then they always can switch it Off with $app->allowCache(false).

no-store is not needed for normal no-cache, no-store means 2 things (afaik). It doesn't allow to to store the content on disk, which actually means you need also no-cache in the cache-control header. We would not remove the no-cache part.

We remove the no-store directive if the logged in user is guest / not logged in. This means you need to revalidate but the backward / forward history cache could load the page from the internal cache.

Technically I should/could add a $app->cacheAllowStore(); and $app->cacheNoStore() method or similar... but would do this in the document and not in the application tbh.

Add a Comment

Login with GitHub to post a comment