What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hey guys, I have an issue with themes. I have the header-organism in two different themes nameIt and

michael.schmetter
michael.schmetter Posts: 119 πŸ§‘πŸ»β€πŸš€ - Cadet

Hey guys,
I have an issue with themes.
I have the header-organism in two different themes nameIt and default.
the nameIt theme is should be only used by the store nameIt, I configured it like here: https://github.com/spryker-academy/frontend-forbackenddev-course/commit/aad14c5be83aa3cf1ae1deb9f7ec82ac3094042a#

Unfortunately for example when choosing which header-organism to choose the first call is correct an then it gets cached. So a sub sequential call to a page for the other store is using the cached header.

I don't think that is how it is supposed to work?

Comments

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited December 2022

    How did you configure twig cache dir?

    \Spryker\Shared\Twig\TwigConfig::getDefaultPathCache

  • michael.schmetter
    michael.schmetter Posts: 119 πŸ§‘πŸ»β€πŸš€ - Cadet

    thanks @UL65CH0MC
    I did not change anything here:

    public function getDefaultPathCache($application = APPLICATION): string
        {
            return sprintf(
                '%s/src/Generated/%s/Twig/codeBucket/.pathCache',
                APPLICATION_ROOT_DIR,
                ucfirst(strtolower($application)),
            );
        }
    

    Do I need to separate this here?

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    I don't know because i don't have a case similar yours... But I think u have to investigate if the problem is the twig cache path...
    I understand so that for all store is the same path Cache... and if is so then it is clear why the sub-sequent request on other store get the wrong header cached

  • michael.schmetter
    michael.schmetter Posts: 119 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank you!
    indeed that seems to solve the problem. Both shops were using the same pathCache.