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

Enable cache on guzzle requests #6688

Merged
merged 1 commit into from Oct 17, 2016

Conversation

Projects
None yet
2 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Oct 14, 2016

⚠️ This PR requires a composer update

Questions Answers
Branch? develop
Description? This PR allow the requests made to marketplace API to be cached, thanks to the CSAGuzzleBundle and the doctrine/cache component. In my example, with a bad connexion I gain almost 500ms on the total execution time of the module page.
Type? improvement
Category? CO
BC breaks? Nope
Deprecations? Nope
Fixed ticket? /
How to test? Load the "installed modules" tabs of the module page. Then, go to the profiler, tab "Guzzle" and look for the API request. It should have "Cache HIT" at the end of the line.

Configuration values

  • Production mode : 2 hours
  • Development mode : 5 minutes

Want your own value ?

Add the following content to your parameters.php file:

<?php return array (
  'parameters' => 
  array (
    [...]
    'prestashop.addons.api_client.ttl' => "0", #unlimited
  ),
);

@Quetzacoalt91 Quetzacoalt91 added WIP and removed WIP labels Oct 14, 2016

@mickaelandrieu mickaelandrieu merged commit 83a16f3 into PrestaShop:develop Oct 17, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mickaelandrieu

This comment has been minimized.

Show comment
Hide comment
@mickaelandrieu
Contributor

mickaelandrieu commented Oct 17, 2016

Thank you @Quetzacoalt91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment