New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidate Product cache on time #6618

Merged
merged 1 commit into from Oct 11, 2016

Conversation

Projects
None yet
4 participants
@firstred
Contributor

firstred commented Oct 9, 2016

Questions Answers
Branch? develop
Description? The product categories cache isn't always invalidated when it has to be. This PR fixes it.
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? http://forge.prestashop.com/browse/PSCSX-8457 - http://forge.prestashop.com/browse/BOOM-1013
How to test? See the following code to paste in a module hooked on actionObjectUpdateAfter

Hook example

    public function hookActionObjectUpdateAfter(Array $params)
    {
        if (isset($params['object'])) {
            if ($params['object'] instanceof Product) {
                $product = new ProductCore($params['object']->id);
//                Cache::clean('Product::getProductCategories_'.(int)$params['object']->id);
                dump($product->getCategories());
            }
        }
    }
@Quetzacoalt91

This comment has been minimized.

Show comment
Hide comment
@Quetzacoalt91

Quetzacoalt91 Oct 11, 2016

Member

PR description updated to add an example for tests

Member

Quetzacoalt91 commented Oct 11, 2016

PR description updated to add an example for tests

@aleeks

This comment has been minimized.

Show comment
Hide comment
@aleeks

aleeks Oct 11, 2016

Contributor

Thank you @firstred
You can cherry-pick this in 1.6 if the bug is here.

Contributor

aleeks commented Oct 11, 2016

Thank you @firstred
You can cherry-pick this in 1.6 if the bug is here.

@aleeks aleeks merged commit 2aa4510 into PrestaShop:develop Oct 11, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment