Mentor SAP
The soft state based query result cache (SQRC) on the hub caches (on request) the result of a READ_ENTITYSET request and applies paging on the result list. Consecutive paging requests for the same query result will then be served from that cache.

 

 

SQRC Requirements

A GET request for an entity set is requested by a client. This will be handled by the SQRC if the following conditions apply:

 

 

 

SQRC Sample Code

IF ( mv_is_softstate = abap_false ).
lv_is_sqrc_allowed = abap_false.
ELSE.
lv_is_sqrc_allowed =
io_tech_request_context->is_cache_page_on_hb_allowed( ).
ENDIF.

* Paging preparation
IF ( lv_is_sqrc_allowed = abap_false ).

*- get number of records requested
lv_top = io_tech_request_context->get_top( ).
*- get number of lines that should be skipped
lv_skip = io_tech_request_context->get_skip( ).
*- value for maxrows must only be calculated
*  if the request also contains a $top
IF lv_top IS NOT INITIAL.
lv_maxrows-bapimaxrow = lv_top + lv_skip.
ENDIF.
es_response_context-do_cache_and_page_on_hub = abap_false.
ELSE.
es_response_context-do_cache_and_page_on_hub = abap_true.
ENDIF.

 

SQRC Important Considerations

SQRC should only used it if all of the following conditions apply to the provider application: