[ISSUE] Issue with cache and category views.... [and a solution proposal]

More
8 years 1 month ago #61399 by ggppdk
Hello

i am looking at it, and i have just seen that:
Code:
if ($menu) foreach($menu->query as $_varname => $_ignore) $safeurlparams[$_varname] = 'STRING';

- is correct code
because the above are not PARAMETERs, they are the HTTP query variables added to non SEF URLs,

- they make the SEF and non-SEF urls have the same cache-ID
thus you have smaller cache size wasted,

now, if you add the menu itemID , then you can skip the above
- no wrong page will be serverd
- but cache will be a little larger, because the SEF and non-SEF urls will have a different cache ID

of course you can argue that your site will never generate non-SEF urls, thus the above effect will not occur

But to cut this discussion short,
= it is best to have both:
Code:
if ($menu) foreach($menu->query as $_varname => $_ignore) $safeurlparams[$_varname] = 'STRING';
and
Code:
if ($menu) $safeurlparams[(string)$menu->id]='STRING';

Finally,
thanks for pointing out this issue,

indeed any menu item that includes parameters that effect the displayed page, MUST add the menu item id to the safeurlparams that create the cache-ID of the page

Fix will be in v3.0.14


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #61400 by ggppdk
About menu item id

did you use capital i for the Itemid ?
Code:
if ($menu) $safeurlparams['Itemid'] = 'STRING';

the above should work instead of :
if ($menu) $safeurlparams[(string)$menu->id]='STRING';


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #61422 by fortino
Thank you very much!

Nope, I must admit I didn't try with the capital I for itemid...

Anyway as you suggest I'll keep them both, I think it's the fairest solution!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.287 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline