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

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?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited December 2022

    How did you configure twig cache dir?

    \Spryker\Shared\Twig\TwigConfig::getDefaultPathCache

  • 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?

  • Technical Lead @ Lรถffelhardt 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

  • Posts: 119 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

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

Welcome!

It looks like you're new here. Sign in or register to get started.