exam questions

Exam AD0-E718 All Questions

View all questions & answers for the AD0-E718 exam

Exam AD0-E718 topic 1 question 21 discussion

Actual exam question from Adobe's AD0-E718
Question #: 21
Topic #: 1
[All AD0-E718 Questions]

An existing Adobe Commerce website is moving to a headless implementation.
The existing website features an “All Brands” page, as well as individual pages for each brand. All brand-related pages are cached in Varnish using tags in the same manner as products and categories.
Two new GraphQL queries have been created to make this information available to the frontend for the new headless implementation:

During testing, the queries sometimes return out-of-date information.
How should this problem be solved while maintaining performance?

  • A. Each GraphQL query’s resolver class should inject \Magento\GraphQlCache\Model\CacheableQuery and call setCacheValidity(true) on it as part of the resolver’s resolve function
  • B. Specify a @cache(cacheable: false) directive for each GraphQL query, making sure that the data returned is not cached, and is up to date
  • C. Specify a @cache(cacheIdentity: Path\\To\\IdentityClass) directive for each GraphQL query, corresponding to a class that adds cache tags for relevant brands and associated products
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
crowleymr
1 year, 4 months ago
Selected Answer: C
The thing is that such content type as Brandh SHOULD be cached since it's something that doesn't change frequently. So making it not cacheable is not an option. For me the correct answer is C, implementing an identity interface
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago