Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
rubben1985

bug in cache and Panda

Question

Hi,

The problem is that cache is not working correctly with panda template modules anymore (maybe also with other modules but I noticed it panda ones).

It happens with bleeding edge 1.1.x (the version from a few weeks ago).

When I active the cache in the performance section, the modules showing info in the front office, show old cached versions. Clearing cache doesnt change this. 🤷‍♂️

In practice, when cache is activated, it doesn´t matter what I modify, changes will not be reflected in the web. Only if i deactivate cache the changes are visible.

I contacted @Jonny because I thought it was only related to one module (st easy content). It seems to be related to TB multistore. The solution was to deactivate the cache in that module. But now I realise it also affects the Megamenu, and who knows what module more.

Did you guys made some changes in how modules cache is managed?

Edited by rubben1985

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0
Posted (edited)
15 hours ago, datakick said:

It's very hard to do this kind of investigation on a live site.

Hi @datakick 
If you'd like, we can reach out to @Jonny and try to organise a complementary copy of Panda for you so you can maybe run it on a bleeding edge test site on local?
That way you can connect the debugger and test to your heart's content. Let us know

Edited by Theo
  • Like 1

Share this post


Link to post
Share on other sites
  • 0

well, it seems this also affect Advanced search module cache. If I do not deactivate TB cache, module cache is showing old data. 

Share this post


Link to post
Share on other sites
  • 0
26 minutes ago, rubben1985 said:

well, it seems this also affect Advanced search module cache. If I do not deactivate TB cache, module cache is showing old data. 

When shop data are changed there is NO automatic cache flush. Every module must handle this individually -- some of them subscribes to 'actionAfterUpdate*' hooks and use this callback to flush cache. Other modules invalidates cache on time basis - these can display stale information.

I don't know how Advances search modules handles cache invalidation. I don't even know what 'Advanced search' module you are referring to, as there are multiple with this same name 🙂

Did you check your smarty cache settings in *all* shop context, as I suggested in my previous post?

Share this post


Link to post
Share on other sites
  • 0

Yes I did.

About this module, it seems it takes some time to be effective the empty of cache but it is emptied after some minutes (Maybe something on hosting level? because is not the browser cache for sure). As information the advanced search is emptied at module level with a specific button.

Still the problem with panda modules even putting all stores cache with same options.

Any idea why is working well the panda cache when user are log in? That this change something in TB?

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

@datakick he's probably referring to Advanced Search 4. In which case @rubben1985 will need to give you the version number he is on.

https://addons.prestashop.com/en/search-filters/2778-advanced-search-4.html 
I'm running on Advanced Search v4.12.5 on TB 1.1.0. On a local environment though as we're in development phase still. So not playing with cache at the moment.

My setup: TB 1.1.0 + AS 4 + Panda.

Bytw, have you given the below any thought? The complimentary copy of Panda for local testing? We can request one from @Jonny if you'd like?

On 3/11/2020 at 8:53 AM, Theo said:

If you'd like, we can reach out to @Jonny and try to organise a complementary copy of Panda for you so you can maybe run it on a bleeding edge test site on local?
That way you can connect the debugger and test to your heart's content. Let us know

 

Edited by Theo

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, Theo said:

@datakick he's probably referring to Advanced Search 4. In which case @rubben1985 will need to give you the version number he is on.

https://addons.prestashop.com/en/search-filters/2778-advanced-search-4.html 
I'm running on Advanced Search v4.12.15 on TB 1.1.0. On a local environment though as we're in development phase still. So not playing with cache at the moment.

My setup: TB 1.1.0 + AS 4 + Panda.

Bytw, have you given the below any thought? The complimentary copy of Panda for local testing? We can request one from @Jonny if you'd like?

 

@rubben1985 gave me access to his back office, so I had a look at the issue. Indeed there was some weird stuff going on. For example, cache was not flushed when you clicked on Clear cache in Performance tab. My investigation showed that this problem was caused by missing /cache/smarty/cache directory.

Recreating this directory using ftp seems to fix the issue (pending confirmation from @rubben1985)

Thirtybees codebase never checked existence of this directory, so this issue is hardly 1.1.x injection. But it's an issue nevertheless -- the system should recover from this situation. The fix is already committed in bleeding edge

  • Like 1
  • Thanks 5

Share this post


Link to post
Share on other sites
  • 0
17 hours ago, datakick said:

@rubben1985 gave me access to his back office, so I had a look at the issue. Indeed there was some weird stuff going on. For example, cache was not flushed when you clicked on Clear cache in Performance tab. My investigation showed that this problem was caused by missing /cache/smarty/cache directory.

Recreating this directory using ftp seems to fix the issue (pending confirmation from @rubben1985)

Thirtybees codebase never checked existence of this directory, so this issue is hardly 1.1.x injection. But it's an issue nevertheless -- the system should recover from this situation. The fix is already committed in bleeding edge

It seems what @datakick did, worked for me!! I still have to test it with more modules, but I can confirm it solved megamenu at least (i suppose also the others but I will check when I will come back to office).

No idea why did come from 1.1.x if that was never checked before... maybe some other fix that made this happen? Well In that case I am happy and we have a new code improvement 🙂 Thanks again @datakick!!

Share this post


Link to post
Share on other sites
  • 0
57 minutes ago, rubben1985 said:

No idea why did come from 1.1.x if that was never checked before... maybe some other fix that made this happen?

This directory should always exist -- it's part of thirtybees installation, and it's also part of ps16 installation. If it was missing on your system, you must have deleted this directory somehow. Either manually, or maybe some module did this for you, who knows. There is no code in thirtybees itself that deletes this directory, there is only code that empties its content.

Therefore, I don't think this issue was related to your 1.1.x update. It's more likely it was just discovered during the verification process. 

  • Like 3

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, datakick said:

This directory should always exist -- it's part of thirtybees installation, and it's also part of ps16 installation. If it was missing on your system, you must have deleted this directory somehow. Either manually, or maybe some module did this for you, who knows. There is no code in thirtybees itself that deletes this directory, there is only code that empties its content.

Therefore, I don't think this issue was related to your 1.1.x update. It's more likely it was just discovered during the verification process. 

I think I never touched cache folders because I do not not know nothing and I am "afraid of touching there" Maybe a module, maybe some developer that sometimes adjust their modules...Who knows 🤷‍♂️ Thanks at any case 🙂 

Share this post


Link to post
Share on other sites
  • 0
On 3/13/2020 at 6:57 PM, datakick said:
On 3/13/2020 at 3:00 PM, Theo said:

@datakick he's probably referring to Advanced Search 4. In which case @rubben1985 will need to give you the version number he is on.

https://addons.prestashop.com/en/search-filters/2778-advanced-search-4.html 
I'm running on Advanced Search v4.12.15 on TB 1.1.0. On a local environment though as we're in development phase still. So not playing with cache at the moment.

My setup: TB 1.1.0 + AS 4 + Panda.

Bytw, have you given the below any thought? The complimentary copy of Panda for local testing? We can request one from @Jonny if you'd like?

 

@rubben1985 gave me access to his back office, so I had a look at the issue. Indeed there was some weird stuff going on. For example, cache was not flushed when you clicked on Clear cache in Performance tab. My investigation showed that this problem was caused by missing /cache/smarty/cache directory.

Recreating this directory using ftp seems to fix the issue (pending confirmation from @rubben1985)

Thirtybees codebase never checked existence of this directory, so this issue is hardly 1.1.x injection. But it's an issue nevertheless -- the system should recover from this situation. The fix is already committed in bleeding edge

Thanks @datakick for taking the time and effort to investigate this and for finding the cause of the problem (at least where the problem was occurring) and implementing a fix in Core.
Your actions here are reassuring and promotes confidence in the project and the ability and willingness from the team to resolve issues. It is appreciated.
Thanks again 😀

  • Like 3

Share this post


Link to post
Share on other sites
  • 0

Kind of funny that distinct cache settings for individual shops are allowed 🙂

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
28 minutes ago, Traumflug said:

Kind of funny that distinct cache settings for individual shops are allowed 🙂

Yeah, I was surprised as well. There's no real benefits, only plenty of potential bugs and issues. We should get rid of this 'feature'

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

yes, the only utility is to work in one store without loosing cache in the other but it creates more problems than benefits (for example I have to review cache per store each X time to assure all shops have it activated

Share this post


Link to post
Share on other sites
  • 0

As Datakick said it is also part of PS16 installation. I had the bad habit in the past when I could not solve caching issues on my onlineshop that I could not understand, then I deleted the folder /cache/smarty/cache  via FTP since that was way faster then deleting the content in that folder. The result was my shop rendered unusable. As I learned hard then and we know now this folder has to exist.

Perhaps the function to check its existence should also be present in /backoffice/performance. I shop owner plays around here and de/activates any cache settings TB should make sure the folder exists. You never know 🙂

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...