[opencms-dev] Flex cache and multiple parameters values

Paul-Inge Flakstad flakstad at npolar.no
Thu Jun 16 13:02:47 CEST 2011


Thanks for your reply, Holger.

I really don't want to do a workaround, since it is perfectly valid for a parameter to have multiple values. (And e.g. if I should need to use checkboxes, this is exactly how it would be.)

This is also reflected by the getParameterValues(String) method in ServletRequest: http://goo.gl/18kaj - it returns an array of Strings, not a String. The getParameter(String) method also states: "You should only use this method when you are sure the parameter has only one value."

In my head, this should mean that it should be possible to create one unique cached page per unique parameter combo - even if that combo is made up of multiple values of the same parameter. For example:

    list-opencms-providers.jsp?country=de

would not be the same page as

    list-opencms-providers.jsp?country=de&country=it&country=no

Is the flex cache flawed with respect to this, or am I just missing something here?

Best regards,
Paul

________________________________
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Kunicke, Holger
Sent: 16. juni 2011 11:35
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Flex cache and multiple parameters values

Hello Paul,

Your guess with the "workaround" solution sounds the best. In some situatiuons I make it so.

Depending on the numbers of multiple categories, a solution would be to use more parameters: "cat1", "cat2", ...

Regards
Holger

Am 15.06.2011 15:05, schrieb Paul-Inge Flakstad:
...

The problem arise when the list is filtered using multiple categories. The URLs for such lists look like this:

2)    mysite.com/en/list.html?cat=/category/one/&cat=/category/two/

With the cache property set to "params=(cat)", flex cache only considers the first "cat" parameter, producing the same output as for 1). Only the first "cat" parameter is considered.

To cache the initial page, I've set the cache property to "no-params=(cat)" - I was unable to find any other solution.

Is there any way to accomplish what I want with flex cache?

(PS I am aware of the workaround solution; using a delimiter character to separate categories and having a single parameter string for "cat", but I was hoping to avoid that one.)

Best regards,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110616/7476f50f/attachment.htm>


More information about the opencms-dev mailing list