Query Cache — Concept Check
Questions on Query Cache. The query cache stores query result IDs; it is invalidated whenever any entity in the queried tables changes, making it only beneficial for rarely-changing reference data.
Questions in this quiz
8 questions on Query Cache — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer notices that the query cache is frequently invalidated in their application. What could be a likely cause?
- AFrequent updates to the queried tables
- BQuery cache not enabled in application.properties
- CL2 cache is not enabled
- DIncorrect cache region configuration
2.You have enabled the query cache for a query on a rarely-changing reference table. What should you ensure for optimal performance?
- AQuery cache stores full entity data
- BOnly query cache is enabled
- CBoth L2 and query cache are enabled
- DQuery cache region has no TTL
3.After inserting a new row into a table, what happens to the query cache for that table?
- AThe query cache is updated with the new row
- BOnly the cache for the new row is invalidated
- CThe query cache remains unchanged
- DThe entire query cache for the table is invalidated
4.A developer configures a query cache region with a 1-hour TTL. What is the purpose of this configuration?
- ATo prevent cache invalidation
- BTo disable cache for frequently updated tables
- CTo limit the lifespan of cached entries
- DTo store full entity data
5.What is a good use case for enabling the query cache?
- AOrder statuses
- BCountry codes
- CUser session data
- DReal-time stock prices
6.A query cache hit returns a list of entity IDs. What happens next?
- AQuery cache stores full entity data
- BEntities are retrieved from the L2 cache
- CEntities are fetched from the database
- DQuery cache directly returns entities
7.A developer marks a query as cacheable but notices no performance improvement. What might be missing?
- AL2 cache is not enabled
- BTTL is set too long
- CQuery cache is storing full entities
- DCache region is misconfigured
8.What happens if you enable the query cache without enabling the L2 cache?
- AQuery cache stores full entity data
- BQuery cache is partially effective
- CQuery cache works independently
- DQuery cache is ineffective