Keyword

cache problem with 2.10.3

  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176074 by Kostas Stathopoulos
cache problem with 2.10.3 was created by Kostas Stathopoulos
after k2 upgrade to 2.10.3 pages and k2 modules often not updating for days until clear browser cache (mostly chrome)
sometimes while it works properly it suddenly displays content from 3-4 days ago
random if hit refresh on browser button displays newest k2 articles but if after click on homepage link displays older content
Joomla 3.9.18 Gantry 4 php 7.3
module cache + page cache on

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

More
4 years 8 months ago #176081 by JoomlaWorks
Replied by JoomlaWorks on topic cache problem with 2.10.3
Gotta see an actual URL to inspect.

It's most likely aggressive client-side caching configured.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 7 months ago #176101 by Petra Webstein
Replied by Petra Webstein on topic cache problem with 2.10.3
I am having the problem too, this is my first installation of K2 so very new to it.

I am using Cache Cleaner of Regularlabs since a long time and this normally solves the problem.

So here is the link to where I am playing with K2 at the moment but would like to implement the Joomla articles soon.

family-historian.com/t/latest

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

More
4 years 7 months ago #176113 by JoomlaWorks
Replied by JoomlaWorks on topic cache problem with 2.10.3
@Petra Webstein It seems you have the Joomla page cache (system) plugin enabled with client-side caching on. The latter is what may cause issues to your site's development workflow.

Overall disable any caching while the site is under development.

K2 doesn't have a bug related to caching, but eventually, you will have to grasp the concepts of caching on the web, what is client-side and what is server-side caching (and their difference) and so on.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 6 months ago #176546 by Bob Whitlock
Replied by Bob Whitlock on topic cache problem with 2.10.3
I think I am seeing a similar problem. My wife has a news site that she's been building with Joomla + K2 + Gantry 5. All the articles are K2 articles and some pages use K2 content modules. A few months ago, she noticed that often when she changes an article in the back end, it doesn't change for the client with F5, but does with ctlr+F5. If I am looking at a single K2 item, it does refresh correctly, but if I look at a page with a list of articles in a K2 content module, it doesn't refresh correctly. Actually the browser is requesting a page, but since the Last-Modified date is not changing, server is returning HTTP 304 and the browser uses locally cached version. Today I noticed that when this started to occur was around the same time K2 2.10.3 was released, and the patch notes do say something about changes around Last-Modified header. The current behavior is clearly not right, so I wonder if we needed to change some setting when updating to 2.10.3.

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

More
4 years 6 months ago #176551 by JoomlaWorks
Replied by JoomlaWorks on topic cache problem with 2.10.3
If you've set caching to Progressive (in Joomla's Global Configuration), then each module instance has its own cache object, separate from the rest of the page. Furthermore, if you have the Page Cache plugin enabled and/or some other caching plugin, this might complicate things and actually extend the module's cache time, especially if you're also overriding the cache time in the module's Advanced settings.

In other words, you'll have to explain to me how caching is configured on your site in detail to provide you with the right answer. From the settings in Global Configuration to the Page Cache plugin and/or other 3rd party caching plugins and of course the affected modules' cache settings.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 6 months ago #176552 by Bob Whitlock
Replied by Bob Whitlock on topic cache problem with 2.10.3
Using Joomla 3.9.19
Under global configuration, Cache Settings:
Cache Handler: "File"
Path to cache folder: blank
Cache Time: 1
Platform Specific Caching: No
System Cache is "OFF"
Page Cache plugin is disabled
I'm not aware of any other cache plugins
When I look at the "clear cache (site)" page, it shows one cache group, "gantry", with zero cache files.
Are there cache settings for K2? I'm not seeing anything.
Gantry 5 themes has:
production mode "no" (we've tried this set both ways and it doesn't seem to affect the problem)
asset timestamps: "Yes" - don't know if that is a factor
timestamp period: 0
Not sure if there's anything else I should be looking at? Thank you for taking time to respond. Hopefully this is just a setting that I've overlooked somewhere.

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

More
4 years 6 months ago #176557 by JoomlaWorks
Replied by JoomlaWorks on topic cache problem with 2.10.3
Is the cache (in Joomla's Global Configuration) set to Conservative or Progressive mode?

Additionally, for the affected modules, what are their cache settings?

And actual live URL would also help...

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 6 months ago #176566 by Bob Whitlock
Replied by Bob Whitlock on topic cache problem with 2.10.3
Joomla's global config cache setting is set to "OFF - Caching Disabled", not "ON - Conservative Caching, nor "ON - Progressive Caching".
My previous email lists this and all the other cache settings that I'm aware of. Regarding the website URL, are you wanting to look at the back end? I'd prefer not to post credentials on the forum.

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

More
4 years 6 months ago #176573 by JoomlaWorks
Replied by JoomlaWorks on topic cache problem with 2.10.3
Comment out these 2 lines github.com/getk2/k2/blob/master/components/com_k2/views/item/view.html.php#L465-L468 for now and I'll make sure this is optional in the next update of K2 via a switch in the K2 Settings.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 6 months ago #176577 by Bob Whitlock
Replied by Bob Whitlock on topic cache problem with 2.10.3
That worked! Thank you so much. So I think I understand why that fixed it but please let me know if I'm right (who knows, maybe some day I'll understand the code enough to contribute). The recent update had some code to set the last_modified header based on article dates, so that updates are still picked up with caching on. However, if caching is turned OFF, it actually hinders in some cases because Joomla by default sets last_modified to current date and time - which makes the page _always_ look new.

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

More
4 years 6 months ago #176588 by JoomlaWorks
Replied by JoomlaWorks on topic cache problem with 2.10.3
The current feature assumed the page to always be cached, as an automated performance feature (so to speak).

But I understand there are obvious cases that this might cause issues, so it's best to make it optional.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 5 months ago #176764 by Jack Hughes
Replied by Jack Hughes on topic cache problem with 2.10.3
Hey I just wanted to report about this caching issue. I was having issues with Roksprocket module not showing new k2 items if the k2 items were created from the frontend. To get Roksprocket to display a new k2 item either things had to be done 1) the k2 item had to be saved from the backend OR 2) the browser cache had to be cleared.

Fotis, I commented out the two lines of code you referenced in your reply. That worked.

Thanks

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

More
4 years 5 months ago #176777 by JoomlaWorks
Replied by JoomlaWorks on topic cache problem with 2.10.3
The issue is probably related to where the module is showing content. If the module is loaded on an item page in which the item's content has not changed, then yes, it would be cached by the browser due to the headers the item itself would emit to the browser. In any case, if the caching is low, e.g. a few mins, then after that time the new content in the module would of course show up. If you're testing things though and wish to instantly see the changes but don't mind if the content loads later to actual users, then you can always hit Ctrl+R or Ctrl+Shift+R to force the browser to re-fetch the page and ignore caching headers.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
3 years 2 months ago #179684 by Josh Wilkinson
Replied by Josh Wilkinson on topic cache problem with 2.10.3
Hi, I have had this same issue with K2 version 2.10.3 and I commented out the 2 lines you suggested and this does fix it. However, you said you add an option in the next version of k2 to address. I have not seen an update to address this in over 1 year. Any idea when this will be fixed?


However, you said the following:

"Comment out these 2 lines  github.com/getk2/k2/blob/master/components/com_k2/views/item/view.html.php#L465-L468  for now and I'll make sure this is optional in the next update of K2 via a switch in the K2 Settings."
 

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

More
2 years 6 months ago #180226 by Josh Wilkinson
Replied by Josh Wilkinson on topic cache problem with 2.10.3
Again, any update on this? It has been 8 months and I haven't heard anything back. You said it would be addressed in the next update. However, there hasn't been an update to k2 in forever so when is this going to be addressed?


Thanks,
Josh

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


Powered by Kunena Forum