magento / graphql-ce

[ARCHIVED] Please use magento/magento2 project
https://github.com/magento/magento2
Open Software License 3.0
131 stars 156 forks source link

[FEATURE] Added cache identity to the StoreConfig GraphQl API Endpoint #1021

Closed lewisvoncken closed 4 years ago

lewisvoncken commented 4 years ago

Description (*)

For performance reasons you want to cache the StoreConfig output because the output is the same for every request but the returned value is based on the request type.

So for example:

In the cache all the data is saved but when you request only base_currency_code it will still cache the full response but only return base_currency_code.

Manual testing scenarios (*)

  1. Enable FPC
  2. Make an api get request for the storeConfig
  3. First will be a cache MISS (see screenshot 1)
  4. Try again
  5. Now you will have a cache HIT (see screenshot 2)

Screenshot 1: image

Screenshot 2: image

Questions or comments

Contribution checklist (*)

lenaorobei commented 4 years ago

@lewisvoncken please address build failures.

lenaorobei commented 4 years ago

Closing this PR due to inactivity. Please feel free to reopen if you want to continue working on it. Thank you.

ghost commented 4 years ago

Hi @lewisvoncken, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.