? ? ? Success

User tests: Successful: Unsuccessful:

avatar OctavianC
OctavianC
25 Aug 2015

Problem

What has really bothered me for some time is that once you enable System - Page Cache you have no control over which pages are being cached. For example, you might want not to cache a particular page. You can't do that unless you disable the plugin completely.

Proposed solution

In the System - Page Cache plugin parameters I've added two new fields:

  • Exclude Menu Items. This is a multiple option dropdown that lists all of your menu items. You can select which menu items will not be cached.
  • Exclude Pages. This is just a <textarea> that accepts regex patterns, each on a new line. I'm sure most people won't know how to use this but then again I'm sure they won't need to. It's also placed in the Advanced tab, I hope not too many people find it :)

Backwards compatibility

I've made all efforts to ensure that this does not break current installations. By default these fields will be empty and will only be checked if they actually have contents.

How to test

Exclude Menu Items

After you create a few menu items, activate the plugin and select them from the list. They will no longer get cached.

Exclude Pages

The matches are performed against the path, including query and fragment (eg. /joomla/index.php?option=com_test&task=something#header).
You can test by activating the plugin, creating some menu items and adding regular expressions to match them in the Exclude Pages field. For example if you create a menu item called contact and your URL will point to /joomla/index.php/contact you can use \/contact\/? as a pattern to exclude all pages that match /contact/ (that means that sub-menu items will be excluded as well).

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
3.00

avatar OctavianC OctavianC - open - 25 Aug 2015
avatar OctavianC OctavianC - change - 25 Aug 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Aug 2015
Labels Added: ? ?
avatar zero-24 zero-24 - change - 25 Aug 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 25 Aug 2015
Category Language & Strings Plugins
avatar zero-24 zero-24 - change - 25 Aug 2015
Easy No Yes
avatar laoneo
laoneo - comment - 27 Aug 2015

I've made a similar PR 1514 long time ago. Perhaps you can inlcude the component option too? Would welcome a new feature like that.

avatar OctavianC
OctavianC - comment - 27 Aug 2015

Let's hope it gets accepted in its current state and then we'll have something to work with. If you want it to be accepted, just test and report back the results :)

avatar laoneo
laoneo - comment - 27 Aug 2015

IMO the options should be made the same globally for all plugins and not only for the cache plugin. Menu selection can be similar as with modules.

avatar Fedik
Fedik - comment - 27 Aug 2015

.. globally for all plugins

please no

avatar laoneo
laoneo - comment - 27 Aug 2015

Why not?

avatar OctavianC
OctavianC - comment - 27 Aug 2015

I don't see the benefit of having these options there? This is about the System - Page Cache plugin not having any parameters to ignore certain pages of your site from caching. As this plugin creates the cache, it only makes sense to add parameters to it instead of everywhere else.

avatar mbabker
mbabker - comment - 27 Aug 2015

There are some plugins where it might make sense to add some more options to limit what content they get triggered on, but I don't think it's appropriate for every plugin to have these types of options.

avatar laoneo
laoneo - comment - 28 Aug 2015

Probably it doesn't make sense to make it for all the plugins visible. But there should be an easy way to add the menu item selection functionality as a field in the plugin manifest file. The JPlugin class should take care if that parameter exists if the plugin is enabled or not, otherwise all the plugins do need to repeat that code if they are supporting menu based selection.

avatar SiteOp SiteOp - test_item - 10 Sep 2015 - Tested successfully
avatar SiteOp
SiteOp - comment - 10 Sep 2015

Perfect.


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

avatar KingLouis1 KingLouis1 - test_item - 24 Oct 2015 - Tested successfully
avatar KingLouis1
KingLouis1 - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on 063c0d1

No difference seen between before and after installation of patch


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

avatar zero-24 zero-24 - alter_testresult - 24 Oct 2015 - SiteOp: Tested successfully
avatar zero-24 zero-24 - change - 24 Oct 2015
Status Pending Ready to Commit
Labels
avatar svom svom - test_item - 24 Oct 2015 - Tested successfully
avatar svom
svom - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on 063c0d1

Tested successfully.

Joomla 3.4.5


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

avatar joomla-cms-bot joomla-cms-bot - change - 24 Oct 2015
Labels Added: ?
avatar Bakual Bakual - change - 24 Oct 2015
Milestone Added:
avatar Bakual
Bakual - comment - 24 Oct 2015

Set Milestone to 3.5.0 as it can't be merged into staging according to SemVer.
I leave it to the 3.5 team to decide if it should be merged or not.

avatar roland-d
roland-d - comment - 28 Oct 2015

I am ok to merge this for 3.5 but want to see some changes first.

@OctavianC Can you make the following changes:

  1. for the exclude area add the following attributes as the textarea is so small now, not very user-friendly.

    class="input-xxlarge"
    rows="15"
    
  2. Extend the tooltip description on the exclude area. At this moment, I have no clue what to put into the textarea. Some examples would be good for users to understand what to type there. They won't be reading this PR :)

Thanks.

avatar joomla-cms-bot
joomla-cms-bot - comment - 29 Oct 2015

This PR has received new commits.

CC: @KingLouis1, @SiteOp, @svom


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

avatar joomla-cms-bot
joomla-cms-bot - comment - 29 Oct 2015

This PR has received new commits.

CC: @KingLouis1, @SiteOp, @svom


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

avatar OctavianC
OctavianC - comment - 29 Oct 2015

I've changed the label to Exclude URLs (since it matches against URLs, not pages) and I've provided some examples in the description, but regex is a very broad topic and I can't summarize it in a tooltip... so if you have any improvements, feel free to post them :)

avatar roland-d roland-d - change - 1 Nov 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-11-01 09:47:35
Closed_By roland-d
avatar roland-d roland-d - reference | e0fc0c2 - 1 Nov 15
avatar roland-d roland-d - merge - 1 Nov 2015
avatar roland-d roland-d - close - 1 Nov 2015
avatar JoshuaLewis
JoshuaLewis - comment - 3 Nov 2015

Will this be included in J 3.5 beta 1?


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

avatar joomla-cms-bot joomla-cms-bot - change - 3 Nov 2015
Labels Removed: ?
avatar zero-24
zero-24 - comment - 3 Nov 2015

Add a Comment

Login with GitHub to post a comment